Skip to content

Commit

Permalink
fix(system-backup): skip backup if it is a DR volume (#3487)
Browse files Browse the repository at this point in the history
ref: longhorn/longhorn 6027, 9330, 10239

Signed-off-by: James Lu <james.lu@suse.com>
  • Loading branch information
mantissahz authored Jan 17, 2025
1 parent 354b11d commit 843ff6b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions controller/system_backup_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -799,6 +799,13 @@ func (c *SystemBackupController) backupVolumesIfNotPresent(systemBackup *longhor

volumeBackups := make(map[string]*longhorn.Backup, len(volumes))
for _, volume := range volumes {
// Don't need to create volume data backup for DR volumes since it will
// be restored from the source volume's backup.
if volume.Status.IsStandby {
c.logger.Infof("Skip backup for standby volume %v", volume.Name)
continue
}

volumeBackupName := bsutil.GenerateName("system-backup")

snapshot, err := c.createVolumeSnapshot(ctx, volume, volumeBackupName)
Expand Down

0 comments on commit 843ff6b

Please sign in to comment.