Skip to content

PostgreSQL backup tool with Point-In-Time-Recovery and restore verification

FIX (backup settings): Do not remove backups on backup settings change

Rostislav Dugin93f695209457
diff --git a/backend/internal/features/backups/config/service.go b/backend/internal/features/backups/config/service.go
index 3f17d4d0..beebd118 100644
--- a/backend/internal/features/backups/config/service.go
+++ b/backend/internal/features/backups/config/service.go
@@ -56,7 +56,8 @@ func (s *BackupConfigService) SaveBackupConfig(
if existingConfig != nil {
// If storage is changing, notify the listener
if s.dbStorageChangeListener != nil &&
- !storageIDsEqual(existingConfig.StorageID, backupConfig.StorageID) {
+ backupConfig.Storage != nil &&
+ !storageIDsEqual(existingConfig.StorageID, &backupConfig.Storage.ID) {
if err := s.dbStorageChangeListener.OnBeforeBackupsStorageChange(
backupConfig.DatabaseID,
); err != nil {