Diese Seite behandelt die erste Version von Samba shadow_copy. Inzwischen gibt es eine neue Implementierung: https://www.samba.org/samba/docs/man/manpages/vfs_shadow_copy2.8.html
/etc/samba/smb.conf
:
[shadow_share] comment = Shadow Copy Enabled Share path = /mnt/lv_test vfs objects = shadow_copy writeable = yes browseable = yes
SNAPNAME=`date +%Y.%m.%d-%H.%M.%S` lvcreate --snapshot --size 100M --name lv_$SNAPNAME /dev/vg_system/lv_test mkdir /mnt/lv_test/@GMT-$SNAPNAME mount -o ro /dev/vg_system/lv_$SNAPNAME /mnt/lv_test/@GMT-$SNAPNAME
cat /etc/fstab >> /mnt/lv_test/amor
/etc/samba/smb.conf
:
[shadow_share] comment = Shadow Copy Enabled Share path = /mnt/shadow/working-copy vfs objects = shadow_copy writeable = yes browseable = yes
SNAPNAME=`date +%Y.%m.%d-%H.%M.%S` cp -al working-copy/ $SNAPNAME ln -s ../$SNAPNAME working-copy/@GMT-$SNAPNAME
cp -a /mnt/shadow/working-copy/amor /mnt/shadow/working-copy/amor.new cat /etc/fstab >> /mnt/shadow/working-copy/amor.new mv /mnt/shadow/working-copy/amor.new /mnt/shadow/working-copy/amor