vmbackupmanager bugfixes: (#577)

- error on running with empty -dst dir and without -runOnStart
- error on restoring with backup, created before v1.90.0
This commit is contained in:
Alexander Marshalov 2023-05-25 15:56:18 +02:00 committed by Aliaksandr Valialkin
parent ec75d9097d
commit b3f8bb5b50
No known key found for this signature in database
GPG key ID: A72BEC6CD3D0DED1

View file

@ -79,7 +79,7 @@ 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 {
if err := dst.CreateFile(fscommon.BackupCompleteFilename, []byte("ok")); err != nil {
return fmt.Errorf("cannot create `backup complete` file at %s: %w", dst, err)
}