Browse Source

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

Refs #3923
pull/3928/head
ssongliu 9 months ago committed by GitHub
parent
commit
e4f9ec32cd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      backend/app/service/snapshot_create.go

2
backend/app/service/snapshot_create.go

@ -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

Loading…
Cancel
Save