This is Gentoo's testing wiki. It is a non-operational environment and its textual content is outdated.
Please visit our production wiki at https://wiki.gentoo.org
Samba shadow copies
From Gentoo Wiki (test)
Samba shadow copies
Samba has stackable VFS (Virtual File System) modules that can be used to extend with new feature. One such VFS module is vfs_shadow_copy2
. It is used to expose filesystem snapshots as Previous Versions to Windows clients.
FILE
/etc/samba/smb.conf
Samba config file[share] path = /mnt/pool/share comment = Shadow Copy Enabled Share vfs objects = shadow_copy2 shadow:snapdir = /mnt/pool/snapshots/ shadow:basedir = /mnt/pool/share shadow:sort = desc shadow:format = share_@GMT_%Y.%m.%d-%H.%M.%S shadow:localtime = yes
shadow:format
is used to match the snapshots in snapdir
user $
ls -l /mnt/pool/snapshots
drwxr-xr-x 1 root root 1252 Jan 4 2016 share_@GMT_2017.02.11-20.25.31
Samba will automatically look for new snapshots and export them to Windows. A Windows client can then view them in the file's or folder's properties.
See also
- Btrfs snapshots - Automatic snapshots with Btrfs filesystem.
- Samba/Guide - Gentoo Samba Guide