Skip to content

Commit 4c3e7ea

Browse files
Dipta Dastamalsaha
authored andcommitted
Skip creating/processing backup-session when backup-config is paused (#759)
* Skip creating/processing backup-session when backup-config is paused * Add backup-session skipped event/status * Ignore previously skipped backup session
1 parent 7905eff commit 4c3e7ea

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

create_backupsession.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@ func (opt *options) createBackupSession() error {
7272
if err != nil {
7373
return err
7474
}
75+
// skip if BackupConfiguration paused
76+
if backupConfiguration.Spec.Paused {
77+
log.Infof("Skipping creating BackupSession. Reason: Backup Configuration %s/%s is paused.", backupConfiguration.Namespace, backupConfiguration.Name)
78+
return nil
79+
}
7580
ref, err := reference.GetReference(stash_scheme.Scheme, backupConfiguration)
7681
if err != nil {
7782
return err

0 commit comments

Comments
 (0)