Use case
I have fast SSD storage for production and larger HDD storage for backups.
A very common retention strategy would be:
-
SSD: Daily snapshots for 60 days
-
HDD backup: Daily snapshots for 180 days
-
HDD backup: Weekly snapshots for 2 years
I do not want to keep the Weekly snapshots for 2 years on the SSD just because I need them for 2 years on the backup. SSD capacity is expensive, while the HDD backup is specifically there for long-term retention.
What is currently missing
There is currently no way to configure this entirely in the WebUI.
Periodic Snapshot Tasks can have different lifetimes, but those lifetimes apply to the source.
A Replication Task can send multiple snapshot schedules to the same destination dataset, but the WebUI only allows one Custom retention lifetime for the whole replication task.
So I can configure:
Daily + Weekly -> 180 days
or:
Daily + Weekly -> 2 years
but not:
Daily -> 180 days
Weekly -> 2 years
on the same replication target.
Requested change
Allow a different destination retention lifetime for each selected Periodic Snapshot Task / snapshot schedule within one Replication Task.
For example:
Daily -> 180 days
Weekly -> 2 years
Both should still replicate into the same destination dataset.
Why this may only require a WebUI change
As far as I understand, the underlying TrueNAS replication backend already supports this.
The replication API already has the lifetimes field, which allows multiple retention rules, each with its own schedule and lifetime. Zettarepl also supports scheduled retention rules.
So the functionality appears to already exist in the backend. What seems to be missing is simply a way to configure these existing lifetimes rules in the TrueNAS WebUI.