I'd like to create a snapshot routine that looks something like this, and export it via shadow-copy ("Previous Versions") on CIFS::
Google reveals a comment on Github that the latter issue can be worked around by clever choice of naming, but it doesn't look like it would be easy to do through the FreeNAS GUI (and might mess around with FreeNAS expectations on snapshot naming, causing other issues?):
Reading up on vfs-shadow-copy2 suggests that perhaps one could add "shadow: format = zfs-auto-snap_%S-%Y-%m-%d-%H%M" to SMB global config, overriding existing naming, and manually change the snapshot names in periodic snapshot tasks if the GUI doesn't have the needed options, or maybe use the setting "shadow:snapdirseverywhere = yes" to automagically solve everything? But I don't want to screw around and find my snapshots unusable or cause a problem in future.
Summary - It seems technically possible to expose all snapshots for a share via Previous Versions, but not doable within the GUI. So what are appropriate ways to do it within FreeNAS? I'd also like to set snapshots with frequencies not in the GUI, how to do it and not break existing functionality?
- Every 30 minutes, kept for 72 hours
- Every 12 hours, kept for 21 days
- Weekly, kept for 6 months
- Offline or further snapshots for 1-3 years or as needed, or backups in addition (this list is only as an example)
Google reveals a comment on Github that the latter issue can be worked around by clever choice of naming, but it doesn't look like it would be easy to do through the FreeNAS GUI (and might mess around with FreeNAS expectations on snapshot naming, causing other issues?):
One can expose all weekly, monthly, hourly snapshots into windows if you're clever with the snapshot naming.. use a number system such as 01, 02, 03 ,04 for week/mon/hour/day etc.. then use the format property to interpret that label as part of the date-time
vfs objects = shadow_copy2
shadow: snapdir = .zfs/snapshot
shadow: sort = desc
shadow: format = zfs-auto-snap_%S-%Y-%m-%d-%H%M
shadow: localtime = yes
too easy :)
Reading up on vfs-shadow-copy2 suggests that perhaps one could add "shadow: format = zfs-auto-snap_%S-%Y-%m-%d-%H%M" to SMB global config, overriding existing naming, and manually change the snapshot names in periodic snapshot tasks if the GUI doesn't have the needed options, or maybe use the setting "shadow:snapdirseverywhere = yes" to automagically solve everything? But I don't want to screw around and find my snapshots unusable or cause a problem in future.
Summary - It seems technically possible to expose all snapshots for a share via Previous Versions, but not doable within the GUI. So what are appropriate ways to do it within FreeNAS? I'd also like to set snapshots with frequencies not in the GUI, how to do it and not break existing functionality?