Skip to content

Default values for backup's retention policy in docs and code are different #3253

Open
@Michal-Leszczynski

Description

@Michal-Leszczynski
  • Here we can see that default retention policy should be: {retention: 7, retentionDays: 0} - that is also what is stated in backup documentation:
    w.Unwrap().IntVar(&cmd.retention, "retention", 7, "")
    w.Unwrap().IntVar(&cmd.retentionDays, "retention-days", 0, "")
  • But later, when creating backup target, its default policy is set to: {retention: 3, retentionDays: 0}.
    func defaultTaskProperties() taskProperties {
    return taskProperties{
    Retention: 3,
    RetentionDays: 0,
    Continue: true,
    }
    }
  • Also, Scylla Manager assigns default retention policy for deleted tasks: {retention: 0, retentionDays: 30}.
    // GetRetention returns the retention policy for a
    // given task ID, with a default of 30 days retention if no policy exists.
    func GetRetention(taskID uuid.UUID, retentionMap RetentionMap) Retention {
    r, ok := retentionMap[taskID]
    if !ok {
    return Retention{30, 0}
    }
    return r
    }

Q1: What should be the default retention policy for a new task?

Q2: Should Scylla Manager purge backups created by deleted tasks? If yes, then should it still be using (if possible) task's original retention policy or should it use default retention policy for deleted tasks? What should be this default retention policy for deleted tasks?

Metadata

Metadata

Assignees

No one assigned

    Labels

    backupbugSomething isn't workingdocumentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions