diff --git a/controller/system_backup_controller.go b/controller/system_backup_controller.go index 54c759d789..29fe08d9e3 100644 --- a/controller/system_backup_controller.go +++ b/controller/system_backup_controller.go @@ -731,6 +731,13 @@ func (c *SystemBackupController) backupVolumesAlways(systemBackup *longhorn.Syst 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 + } + backup, err := c.createVolumeBackup(volume, systemBackup) if err != nil { return nil, err diff --git a/controller/system_rollout_controller.go b/controller/system_rollout_controller.go index 8f2247439c..3d293e9452 100644 --- a/controller/system_rollout_controller.go +++ b/controller/system_rollout_controller.go @@ -1906,7 +1906,7 @@ func (c *SystemRolloutController) restoreVolumes() (err error) { restore.ResourceVersion = "" restore.Spec.NodeID = "" - if restore.Status.LastBackup != "" { + if restore.Status.LastBackup != "" && !restore.Status.IsStandby { restore.Spec.FromBackup = backupstore.EncodeBackupURL(restore.Status.LastBackup, restore.Name, c.backupTargetURL) log = log.WithField("fromBackup", restore.Spec.FromBackup) }