diff --git a/lib/backup/actions/backup.go b/lib/backup/actions/backup.go index 5c6c80df9..108cd3630 100644 --- a/lib/backup/actions/backup.go +++ b/lib/backup/actions/backup.go @@ -79,6 +79,10 @@ func (b *Backup) Run() error { if err := storeMetadata(src, dst); err != nil { return fmt.Errorf("cannot store backup metadata: %w", err) } + if err := dst.CreateFile(fscommon.BackupCompleteFilename, []byte{}); err != nil { + return fmt.Errorf("cannot create `backup complete` file at %s: %w", dst, err) + } + return nil } @@ -99,7 +103,7 @@ func storeMetadata(src *fslocal.FS, dst common.RemoteFS) error { return fmt.Errorf("cannot marshal metadata: %w", err) } - if err := dst.CreateFile(fscommon.BackupCompleteFilename, metadata); err != nil { + if err := dst.CreateFile(fscommon.BackupMetadataFilename, metadata); err != nil { return fmt.Errorf("cannot create `backup complete` file at %s: %w", dst, err) } diff --git a/lib/backup/fscommon/fscommon.go b/lib/backup/fscommon/fscommon.go index 8897cc6b8..f76eb81ce 100644 --- a/lib/backup/fscommon/fscommon.go +++ b/lib/backup/fscommon/fscommon.go @@ -235,3 +235,6 @@ func IgnorePath(path string) bool { // BackupCompleteFilename is a filename, which is created in the destination fs when backup is complete. const BackupCompleteFilename = "backup_complete.ignore" + +// BackupMetadataFilename is a filename, which contains metadata for the backup. +const BackupMetadataFilename = "backup_metadata.ignore"