大网数据广告活动
服务器运维问答

Samba 4.2 Shadow Copies in Windows 10 - empty list

· 52CE 我爱测

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 writabl…

问题原文

原帖链接 · Keroronsk · CC BY-SA 3.0

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/[email omitted]    64K      -    96K  -
tank/samba/[email omitted]    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.

已采纳解答

原帖链接 · wazoox · CC BY-SA 3.0

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

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2017-02-07)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。