ZFS Snapshots und Samba Shadow Copy

hackmann

Renowned Member
Jan 6, 2013
230
13
83
Hallo zusammen,
wollte nur meine Lösung posten, eventuell kann es einer gebrauchen

Code:
apt install samba

zfs create  -o casesensitivity=mixed -o xattr=sa -o dnodesize=auto -o compression=on -o aclmode=passthrough -o acltype=posix -o aclinherit=passthrough rpool/daten


zfs set snapdir=visible rpool
zpool set listsnapshots=on rpool
apt install zfs-auto-snapshot
zfs set com.sun:auto-snapshot=true rpool/daten


chmod 2775 /rpool/daten

groupadd smbshare
chgrp -R smbshare /rpool/daten
chmod 2775 /rpool/daten

useradd -M -s /sbin/nologin jochen
usermod -aG smbshare jochen
smbpasswd -a jochen

chown jochen:smbshare /rpool/daten

drwxrws---+  5 jochen smbshare  5 Jan  1 21:36 daten

[global]
#https://gist.github.com/sporkus/2dfaafe582b9385b09a1ad7809189b43
vfs objects = shadow_copy2
shadow:snapdir = .zfs/snapshot
shadow:format = -%Y-%m-%d-%H%M
shadow:snapprefix = ^zfs-auto-snap_\(frequent\)\{0,1\}\(hourly\)\{0,1\}\(daily\)\{0,1\}\(monthly\)\{0,1\}
shadow:delimiter = -20
shadow:localtime = no


[data]
  path = /rpool/daten
  read only = no
  browseable = yes
  writable = yes
  guest ok = no
  valid users = @smbshare
  force create mode = 770
  force directory mode = 770
  inherit permissions = yes

auf einem Proxmox 8 eingerichtet für windows 10 und Windows 11.

liebe grüße
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!