I have a Debian 8 system with Samba 4.2. I'm using ZFS file system for data storage. Windows sharing is working fine, except Windows clients can't see any Shadow Copies snapshots.
My samba config is:
[Test]
comment = test
writable = yes
directory mask = 0777
guest ok = Yes
path = /samba/123
create mask = 0666
read only = No
vfs objects = shadow_copy2
shadow: format = auto-%Y-%m-%d_%H.%M.%S--28d
shadow: sort = desc
shadow: snapdir = .zfs/snapshot
My snapshot list is:
zfs list -t snapshot
NAME USED AVAIL REFER MOUNTPOINT
tank/samba/123@GMT-2017.01.06-16.00.00 64K - 96K -
tank/samba/123@GMT-2017.01.07-10.00.00 64K - 96K -
tank/samba/123@GMT_2017.02.07-14.00.32 64K - 120K -
tank/samba/123@GMT_2017.02.07-07.02.04 64K - 120K -
I can actually cd into .zfs/snapshot and see these snapshots.
I'm trying to check any errors in log:
journalctl -u smbd -f does not see any errors/warning even with debug level = 10.
I even checked client-server communications with Wireshark, and it seems to be OK also:
SMB2 178 Ioctl Request FSCTL_GET_SHADOW_COPY_DATA File: test1.txt
SMB2 186 Ioctl Response FSCTL_GET_SHADOW_COPY_DATA File: test1.txt SUCCESS
What else can I do? Thank you in advance.
Answer
I can't test it to be sure, however I think you shouldn't add the expiration duration (--28) to the shadow format. Oh, and obviously your format is wrong, you're mixing up the separators, they don't match those you're using for your snapshots. Set it up this way:
shadow: format = auto-%Y.%m.%d-%H.%M.%S
Comments
Post a Comment