I‘m currently setting up my onsite backup and want my main pool to be replicated to my backup machine but want the backup target to hold a different (longer) retention time for different snapshots.
My current snapshots:
Daily - Kept for 7 days
Weekly - Kept for 4 Weeks
Monthly - Kept for 3 Months
I know I can set a different retention time in the replication task but this is for all snapshots. So my daily snapshots would be kept for 6 month for example. But I want to implement this retention time on the backup machine:
daily keep for 1 month
weekly keep for 3 month
monthly keep for 6 month
I came across an post in the old forum with the same question, but it wasn’t really answered.
Is it even possible to implement this kind of retention time within TrueNAS replication tasks?
Maybe some other workarounds you can think of? What about creating the same snapshot tasks on the backup (same naming scheme etc) and set a higher retention time? But then I think the replication tasks doesnt match up the snapshots from the source anymore. Strange that there is not the option to set different lifetimes for different snapshots
I was about to write up a theoretical way this can be done with scripting, but I think a feature request is more warranted. This is actually something I would expect to be shipped with TrueNAS by default.
If the Replication Tasks allow you to choose multiple Snapshot Tasks or Naming Schemas, then it should present a “Retention Policy” option for each schema.
Yes I’m aware on that but thanks for pointing it out. But since its seems currently not possible what I want to do I have to set the retention time higher in the replication task anyway.
I don’t know how that relates to the other requirements.
I have three snapshot tasks for dailies, weeklies and monthlies—all with the same naming scheme, but different retention times. The backup server runs a single daily PULL task to retrieve the snaphsot(s). (PUSH should work as well.)
What I think cannot be done is having different retention times on the source and the destination.
A script on the backup server that combines “holds”, “releases”, and “deferred destructions” (i.e, zfs destroy -d) could theoretically accomplish this.
I think that this should be integrated into the GUI, to keep TrueNAS as much of an appliance as possible.