Skip to content

Commit 53cdf9a

Browse files
committed
fix: backup after force remove temp
1 parent 1adf30d commit 53cdf9a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/processors/helper/helper.cron.service.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ export class CronService {
9292
try {
9393
await $`mongodump -h 127.0.0.1 -d ${MONGO_DB.collectionName} -o ${backupDirPath} >/dev/null 2>&1`
9494
cd(backupDirPath)
95-
await $`zip -r backup-${dateDir} mx-space/* && rm -r mx-space`
95+
await nothrow($`pwd && ls -a`)
96+
await $`zip -r backup-${dateDir} mx-space/* && rm -rf mx-space`
9697

9798
this.logger.log('--> 备份成功')
9899
} catch (e) {

0 commit comments

Comments
 (0)