Forget command. Am i using it correct?

Hi together,
im using restic since over a year now and my current strategy is to store the backups of the last two month.

I now want to extend my backup strategy:

  • Last 60 days
  • 1 Snapshot per month over the last 2 years

I already tried with "forget --keep-within-daily “60d” --keep-within-monthly “24m --dry-run” but iam unsecure if this is correct. I dont want to destroy my current repository.

Would be great if anybody with more knowldege can help me.

Best regards and happy new year,
Mathias

The forget command shows you which snapshots will be kept. If that matches your expectation then it should be fine.

The given parameters match what you’ve stated as backup strategy.

Does that mean that you’re currently using just --keep-within-daily 60d? Adding more --keep-* options will only increase the amount of backups to keep. forget evaluates each option separately and then keeps every snapshot which is matched by at least one option.

Hi @MichaelEischer , currently im using --keep-within "2m". Testing with “dry run” with my new arguments isnt working at the moment because i have no snapshots older than 2 month :-).

But i trust in your experience when you say The given parameters match what you’ve stated as backup strategy.

Thank you for your reply !