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!



