Passing a full duration as retention period is more flexible

This commit is contained in:
Frederik Ring
2025-02-06 15:33:08 +01:00
parent 23756074f9
commit 378217e517
6 changed files with 23 additions and 7 deletions

View File

@@ -225,6 +225,10 @@ func (s *script) init() error {
s.storages = append(s.storages, dropboxBackend)
}
if s.c.BackupRetentionDays > 0 && s.c.BackupRetentionPeriod > 0 {
return errwrap.Wrap(nil, "both BACKUP_RETENTION_DAYS and BACKUP_RETENTION_PERIOD were configured, which are mutually exclusive")
}
if s.c.EmailNotificationRecipient != "" {
emailURL := fmt.Sprintf(
"smtp://%s:%s@%s:%d/?from=%s&to=%s",