Skip to content

Instantly share code, notes, and snippets.

@evandhoffman
Created February 9, 2017 04:27
Show Gist options
  • Save evandhoffman/8c8fe5d88262589e4493a8aa5441afbd to your computer and use it in GitHub Desktop.
Save evandhoffman/8c8fe5d88262589e4493a8aa5441afbd to your computer and use it in GitHub Desktop.
smb.conf with ZFS volumes mapped to Previous Versions
[global]
# other stuff here...
shadow: snapdir = .zfs/snapshot
shadow: sort = desc
shadow: format = snap_%Y-%m-%d-%H%M
[public]
comment = Files for all
browseable = yes
read only = no
#create mask = 0775
path = /lunix1/data1/public
guest ok = no
valid users = @samba
force directory mode = 0771
force create mode = 0774
force group = samba
write list = @samba
vfs objects = shadow_copy2
#!/bin/bash
ts=`TZ=UTC date +snap_%Y-%m-%d-%H%M`
/sbin/zfs snapshot lunix1/data1@$ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment