Skip to content

Commit

Permalink
Document default behaviour of "after-backup"
Browse files Browse the repository at this point in the history
  • Loading branch information
jkellerer committed Jul 14, 2023
1 parent ab2565b commit db462a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions config/profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ type RetentionSection struct {
ScheduleBaseSection `mapstructure:",squash" deprecated:"0.11.0"`
OtherFlagsSection `mapstructure:",squash"`
BeforeBackup *bool `mapstructure:"before-backup" description:"Apply retention before starting the backup command"`
AfterBackup *bool `mapstructure:"after-backup" description:"Apply retention after the backup command succeeded"`
AfterBackup *bool `mapstructure:"after-backup" description:"Apply retention after the backup command succeeded. Defaults to true if any \"keep-*\" flag is set and \"before-backup\" is unset"`
}

func (r *RetentionSection) IsEmpty() bool { return r == nil }
Expand Down Expand Up @@ -230,7 +230,7 @@ func (r *RetentionSection) resolve(profile *Profile) {
}

// Copy "tag" from "backup" if it was set and hasn't been redefined here
// Allow setting it at profile level when not defined in "backup" or "retention"
// Allow setting it at profile level when not defined in "backup" nor "retention"
if hasBackup &&
!isSet(r, constants.ParameterTag) &&
isSet(profile.Backup, constants.ParameterTag) {
Expand Down

0 comments on commit db462a3

Please sign in to comment.