fix: backup after force remove temp

This commit is contained in:
Innei
2021-09-29 11:28:37 +08:00
parent 1adf30dfa3
commit 53cdf9a36c

View File

@@ -92,7 +92,8 @@ export class CronService {
try {
await $`mongodump -h 127.0.0.1 -d ${MONGO_DB.collectionName} -o ${backupDirPath} >/dev/null 2>&1`
cd(backupDirPath)
await $`zip -r backup-${dateDir} mx-space/* && rm -r mx-space`
await nothrow($`pwd && ls -a`)
await $`zip -r backup-${dateDir} mx-space/* && rm -rf mx-space`
this.logger.log('--> 备份成功')
} catch (e) {