Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
lichunzhu committed Jul 14, 2020
1 parent b73460a commit a23fa3b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/backup-manager/app/export/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,6 @@ func (bm *BackupManager) performBackup(backup *v1alpha1.Backup, db *sql.DB) erro
return errorutils.NewAggregate(errs)
}
klog.Infof("archive cluster %s backup data %s success", bm, archiveBackupPath)
// archive succeed, origin dir can be deleted safely
os.RemoveAll(backupFullPath)

opts := util.GetOptions(backup.Spec.StorageProvider)
size, err := getBackupSize(archiveBackupPath, opts)
Expand Down Expand Up @@ -316,6 +314,8 @@ func (bm *BackupManager) performBackup(backup *v1alpha1.Backup, db *sql.DB) erro
return errorutils.NewAggregate(errs)
}
klog.Infof("get cluster %s commitTs %s success", bm, commitTs)
// get commitTs succeed, origin dir can be deleted safely
os.RemoveAll(backupFullPath)

remotePath := strings.TrimPrefix(archiveBackupPath, constants.BackupRootPath+"/")
bucketURI := bm.getDestBucketURI(remotePath)
Expand Down

0 comments on commit a23fa3b

Please sign in to comment.