fix: 快照时排除备份目录下的快照文件 (#3926)

Refs #3923
This commit is contained in:
ssongliu 2024-02-20 16:36:08 +08:00 committed by GitHub
parent 319c21fc36
commit e4f9ec32cd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -121,7 +121,7 @@ func snapBackup(snap snapHelper, localDir, targetDir string) {
defer snap.Wg.Done()
_ = snapshotRepo.UpdateStatus(snap.Status.ID, map[string]interface{}{"backup_data": constant.Running})
status := constant.StatusDone
if err := handleSnapTar(localDir, targetDir, "1panel_backup.tar.gz", "./system;"); err != nil {
if err := handleSnapTar(localDir, targetDir, "1panel_backup.tar.gz", "./system;./system_snapshot;"); err != nil {
status = err.Error()
}
snap.Status.BackupData = status