How File History + SMB + automated snapshots, work together, in 12?

Stilez

Guru
Joined
Apr 8, 2016
Messages
529
I'm looking for docs on this. Sadly the new docs site is very weak so far compared to the 11.x version, although hopefully not for long. On 11.x every option and function had something said about it, but with the v12 docs hub, I can't easily find most of that, and this is an example.

Any help much appreciated, I know it's enhanced but don't know how it now works and whats changed. Specifically things like having hourly + daily + weekly snaps with timed destruction, and all snaps appearing in File History/Time Machine?

Help appreciated.
 

Ericloewe

Server Wrangler
Moderator
Joined
Feb 15, 2014
Messages
20,194
If I understand correctly, Samba has been taught how to read all snapshots, which is an upgrade from the older "Samba can use a single snapshot task" method.

@anodos, can you provide us with some insight?
 

anodos

Sambassador
iXsystems
Joined
Mar 6, 2014
Messages
9,554
We use zfs_iter_snapshots_sorted() from libzfs to generate a list of snapshots that have > 0 bytes used. These get presented to users as previous versions. If someone is particularly picky about what gets presented, they can set:
shadow:include = <list of snapshots>
or
shadow:exclude = <list of snapshots>
wildcards (* and ?) are supported.

Because this is windows, there is a limitation on (1) how many snaps can be presented and (2) type of information that can be presented. If more precise access is required, users can cd into ".zfs/snapshot" at the root of the ZFS dataset, which is accessible even if snapdir is not visible.
 
Last edited:

Stilez

Guru
Joined
Apr 8, 2016
Messages
529
We use zfs_iter_snapshots_sorted() from libzfs to generate a list of snapshots that have > 0 bytes used. These get presented to users as previous versions. If someone is particularly picky about what gets presented, they can set:
shadow:include = <list of snapshots>
or
shadow:exclude = <list of snapshots>
wildcards (* and ?) are supported.

Because this is windows, there is a limitation on (1) how many snaps can be presented and (2) type of information that can be presented. If more precise access is required, users can cd into ".zfs/snapshot" at the root of the ZFS dataset, which is accessible even if snapdir is not.
I'm quite impressed at the new periodic snaps handling. The way it recognises if different periodic snap tasks needed a snap at the same time, and takes the minimal number of snaps (depending on snap name format) that it requires, and persists each to the last periodic task needing it. That's some pretty neat logic!
 

Stilez

Guru
Joined
Apr 8, 2016
Messages
529
Nice!
Then I don't need my zfs+symlink trickery script anymore.
Mhmm. I've ditched my periodic custom named snapshot script, and using the inbuilt one on 12-BETA, with all snapshot tasks simply naming their snaps identically as "auto-<TIMESTAMP>"
 
Top