Fredda
Guru
- Joined
- Jul 9, 2019
- Messages
- 608
As far as I understand it, accessing previous version of files via SMB only works if the smb share is a dataset on which snapshots are enabled.
I have a user volume /mnt/pool/user, share this volume as "homes", select the daily snapshot in the dropdown when configuring the share, everything is fine, users can access old versions of their file.
But I have a different dataset for projects /mnt/pool/projects, where subfolders are shared with access permissions on user level,
so there is a share for /mnt/pool/projects/project1 another /mnt/pool/project2 and so on.
I managed to make previous versions accessible by hacking the Auxiliary Parameters
What I don't like here is that I have to overwrite the vfs objects. There are several vfs objects which can be additionally configured via dropdown but shadow_copy2 is not one of them. (At least in FN 11.2u7) Does anybody have an idea how to solve this in a better way?
Also, has anybody an idea how to catch all snapshots? shadow:format does not seem to handle any wildcards, I've seen shadow:snapprefix, but with the FreeNAS naming scheme for snapshots one would need a shadow:snappostfix attribute ...
I have a user volume /mnt/pool/user, share this volume as "homes", select the daily snapshot in the dropdown when configuring the share, everything is fine, users can access old versions of their file.
But I have a different dataset for projects /mnt/pool/projects, where subfolders are shared with access permissions on user level,
so there is a share for /mnt/pool/projects/project1 another /mnt/pool/project2 and so on.
I managed to make previous versions accessible by hacking the Auxiliary Parameters
Code:
shadow:snapdirseverywhere = yes shadow:snapdir = /mnt/pool/projects/.zfs/snapshot shadow:basedir = /mnt/pool/projects/project1 shadow:sort = desc shadow:localtime = yes shadow:format = auto-%Y%m%d.%H%M-2w vfs objects = shadow_copy2 zfs_space zfsacl streams_xattr
What I don't like here is that I have to overwrite the vfs objects. There are several vfs objects which can be additionally configured via dropdown but shadow_copy2 is not one of them. (At least in FN 11.2u7) Does anybody have an idea how to solve this in a better way?
Also, has anybody an idea how to catch all snapshots? shadow:format does not seem to handle any wildcards, I've seen shadow:snapprefix, but with the FreeNAS naming scheme for snapshots one would need a shadow:snappostfix attribute ...