修复本地部署设置 dataPath 后,备份目录可能错误

This commit is contained in:
whyour 2024-11-18 22:59:07 +08:00
parent 02c6ad8004
commit b321530dcf

View File

@ -402,7 +402,7 @@ export default class SystemService {
public async exportData(res: Response) { public async exportData(res: Response) {
try { try {
await promiseExec( await promiseExec(
`cd ${config.rootPath} && tar -zcvf ${config.dataTgzFile} data/`, `cd ${config.dataPath} && cd ../ && tar -zcvf ${config.dataTgzFile} data/`,
); );
res.download(config.dataTgzFile); res.download(config.dataTgzFile);
} catch (error: any) { } catch (error: any) {