Skip to content

Instantly share code, notes, and snippets.

@BertMueller18
Forked from evandhoffman/smb.conf
Created September 18, 2018 11:54
Show Gist options
  • Save BertMueller18/70b591d4c32be8e754f445326a0267ab to your computer and use it in GitHub Desktop.
Save BertMueller18/70b591d4c32be8e754f445326a0267ab 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