I want to set up a system that has daily/weekly/monthly snapshots that are retained for a certain length of time, and I want to replicate that system to a backup TrueNAS server on which the snapshots are retained for longer. I have searched forums and the internet as a whole, and I have dug into the menus of TrueNAS, and it seems like that is impossible. Please help me, as that seems like something that should be easy to do. Surely I am misunderstanding something.
The creation of different types of snapshots is easy. You go into “Periodic Snapshot Tasks”, and create a task for each type of snapshot. You set retention there.
As for replication, let’s look at push replication. If you set up a replication task, under “Periodic Snapshot Tasks” you can select all the snapshot tasks. Excellent. Under “Snapshot Retention Policy” you can say “none”, which isn’t what I want, or “Same as Source” which isn’t what I want, or “Custom”. That sound great, but there’s just one edit box to specify a fixed lifetime for all snapshots, and I want a different retention for daily vs weekly vs monthly ones.
One might say, “use the ‘none’ retention policy, but on the remote side purge snapshots on the schedule you want”. OK; how does one do that? Snapshot tasks only purge when run, and they’re only run to create snapshots on a schedule. If my replication target dataset is read-only, which I’d want it to be, I can’t create the snapshots, and so I can’t purge them on schedule.
Switching to pull replication doesn’t seem to help. If I use pull replication, I no longer have a popup of “Periodic Snapshot Tasks” to select tasks, so either I provide the naming schema of one type of snapshot, or craft a regex to get multiple tasks. If I craft a regex to include the multiple tasks, then the “Snapshot Retention Policy” is only “none” or “same as source” which doesn’t help, and if I give the naming schema, then I get the “custom” again.
And I can’t have multiple replications going on, one for each type of snapshot, in which I can set individual expirations, as that would replicate everything multiple times if it allows me to do that at all.
Maybe zrepl would work better for my use case, but there’s no good way to get that going on TrueNAS. Does zettarepl have a magic switch not in the UI?
I’m in shock that this basic task of keeping snapshots longer on a replication target than a source seems so impossible. Surely I’m missing something. Any help would be appreciated.
Thanks!



