scylla-manager icon indicating copy to clipboard operation
scylla-manager copied to clipboard

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

Open Michal-Leszczynski opened this issue 2 years ago • 3 comments

  • Here we can see that default retention policy should be: {retention: 7, retentionDays: 0} - that is also what is stated in backup documentation: https://github.com/scylladb/scylla-manager/blob/87cc888256a91dcd8ab7b2ca791598f0fe141746/pkg/command/backup/cmd.go#L83-L84
  • But later, when creating backup target, its default policy is set to: {retention: 3, retentionDays: 0}. https://github.com/scylladb/scylla-manager/blob/87cc888256a91dcd8ab7b2ca791598f0fe141746/pkg/service/backup/model.go#L243-L249
  • Also, Scylla Manager assigns default retention policy for deleted tasks: {retention: 0, retentionDays: 30}. https://github.com/scylladb/scylla-manager/blob/87cc888256a91dcd8ab7b2ca791598f0fe141746/pkg/service/backup/service.go#L87-L97

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?

Michal-Leszczynski avatar Nov 03 '22 10:11 Michal-Leszczynski

@tzach do you know how we should set those default values?

Michal-Leszczynski avatar Nov 30 '22 13:11 Michal-Leszczynski

Not with out looking deeper into this.

tzach avatar Nov 30 '22 14:11 tzach

Let use the same values that we put into the documentation https://manager.docs.scylladb.com/stable/sctool/backup.html#retention https://manager.docs.scylladb.com/stable/sctool/backup.html#retention-days

retention 7, retention-days 0

Let's inform the end-user about the 30 days retention for the backups made with the deleted task.

karol-kokoszka avatar Jul 10 '23 15:07 karol-kokoszka