diff --git a/internal/manager/manager.go b/internal/manager/manager.go index 4827a3e3d..ca70b1c13 100644 --- a/internal/manager/manager.go +++ b/internal/manager/manager.go @@ -322,6 +322,11 @@ func (s *Manager) BackupDatabase(download bool) (string, string, error) { backupPath = f.Name() backupName = s.Database.DatabaseBackupPath("") f.Close() + + // delete the temp file so that the backup operation can create it + if err := os.Remove(backupPath); err != nil { + return "", "", fmt.Errorf("could not remove temporary backup file %v: %w", backupPath, err) + } } else { backupDir := s.Config.GetBackupDirectoryPathOrDefault() if backupDir != "" {