From cee948a39f94dc1c794dde027c64f10828b6b2da Mon Sep 17 00:00:00 2001 From: James Lu Date: Fri, 17 Jan 2025 14:34:20 +0800 Subject: [PATCH] fix(system-backup): skip backup if it is a DR volume (#3487) ref: longhorn/longhorn 6027, 9330, 10239 Signed-off-by: James Lu (cherry picked from commit 843ff6b659e64e7a1b4b60f3af758e3ad3e57cb8) --- controller/system_backup_controller.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/controller/system_backup_controller.go b/controller/system_backup_controller.go index 43e916d46d..abe4fb0c66 100644 --- a/controller/system_backup_controller.go +++ b/controller/system_backup_controller.go @@ -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)