Hi Jeremy, Here's the log with log level 10: https://pastebin.com/0EAuz2B8 The location of the shared folder: /pool/shadowtest The location of the snapshots: /pool/shadowtest/.zfs/snapshot Here are how snapshots are named: autosnap_2019-09-01_13:29:01_daily autosnap_2019-09-01_13:29:01_hourly autosnap_2019-09-01_13:44:09_frequently And this is currently in my smb.conf file: [shadowtest] path = /pool/shadowtest valid users = user1 read only = no writeable = yes guest ok = no create mode = 770 directory mode = 770 vfs objects = shadow_copy2 shadow:snapdir = /skyhawk2x4tb/shadowtest/.zfs/snapshot shadow:snapprefix = ^autosnap_ shadow:format = %Y-%m-%d_%H:%M:%S_\(frequently\)\{0,1\}\(hourly\)\{0,1\}\(daily\)\{0,1\}\(monthly\)\{0,1\} shadow:delimiter = _ shadow:sort = desc shadow:localtime = no I do not see the snapshots listed in the Windows Previous Version tab, so it doesn't work, but I can't figure out why. Any ideas? ??????? Original Message ??????? On Monday, August 12, 2019 1:14 PM, Jeremy Allison via samba <samba at lists.samba.org> wrote:> On Sat, Aug 10, 2019 at 11:22:53PM +0000, douxevip via samba wrote: > > > So I'm trying to get shadow copies to work with Windows clients. The snapshots are being stored at /test/.zfs/snapshot > > The snapshots are being named like so: > > autosnap_2019-08-10_21:00:00_frequently > > autosnap_2019-08-10_21:00:00_monthly > > autosnap_2019-08-10_22:00:00_hourly > > This is in my smb.conf: > > [test] > > vfs objects = shadow_copy2 > > shadow:snapdir = /test/.zfs/snapshot > > shadow:snapprefix = ^autosnap_ > > shadow:format = %Y-%m-%d_%H:%M:%S_\(frequently\)\{0,1\}\(hourly\)\{0,1\}\(daily\)\{0,1\}\(monthly\)\{0,1\} > > #shadow:delimiter = _ > > shadow:sort = desc > > shadow:localtime = no > > I've also tried it with the delimiter line uncommented (and then removing the underscore from the snapprefix), I've tried putting the shadow:format syntax between quotation marks ("") as well, but it doesn't just show up in Windows. > > I think that syntax should just work according to the manual. Why is it not working? > > What does log level 10 say ? > > ------------------------------- > > To unsubscribe from this list go to the following URL and read the > instructions: https://lists.samba.org/mailman/options/samba
The last email had 1 little error in the smb.conf that I forgot to edit for the email: skyhawk2x4tb was the old poolname, I have it renamed to /pool now, so this is not a source of the problem. ??????? Original Message ??????? On Sunday, September 1, 2019 2:20 PM, douxevip <douxevip at protonmail.com> wrote:> Hi Jeremy, > > Here's the log with log level 10: https://pastebin.com/0EAuz2B8 > > The location of the shared folder: /pool/shadowtest > The location of the snapshots: /pool/shadowtest/.zfs/snapshot > Here are how snapshots are named: > > autosnap_2019-09-01_13:29:01_daily > autosnap_2019-09-01_13:29:01_hourly > autosnap_2019-09-01_13:44:09_frequently > > And this is currently in my smb.conf file: > > [shadowtest] > path = /pool/shadowtest > valid users = user1 > read only = no > writeable = yes > guest ok = no > create mode = 770 > directory mode = 770 > vfs objects = shadow_copy2 > shadow:snapdir = /skyhawk2x4tb/shadowtest/.zfs/snapshot > shadow:snapprefix = ^autosnap_ > shadow:format = %Y-%m-%d_%H:%M:%S_\(frequently\)\{0,1\}\(hourly\)\{0,1\}\(daily\)\{0,1\}\(monthly\)\{0,1\} > shadow:delimiter = _ > shadow:sort = desc > shadow:localtime = no > > I do not see the snapshots listed in the Windows Previous Version tab, so it doesn't work, but I can't figure out why. Any ideas? > > ??????? Original Message ??????? > On Monday, August 12, 2019 1:14 PM, Jeremy Allison via samba samba at lists.samba.org wrote: > > > On Sat, Aug 10, 2019 at 11:22:53PM +0000, douxevip via samba wrote: > > > > > So I'm trying to get shadow copies to work with Windows clients. The snapshots are being stored at /test/.zfs/snapshot > > > The snapshots are being named like so: > > > autosnap_2019-08-10_21:00:00_frequently > > > autosnap_2019-08-10_21:00:00_monthly > > > autosnap_2019-08-10_22:00:00_hourly > > > This is in my smb.conf: > > > [test] > > > vfs objects = shadow_copy2 > > > shadow:snapdir = /test/.zfs/snapshot > > > shadow:snapprefix = ^autosnap_ > > > shadow:format = %Y-%m-%d_%H:%M:%S_\(frequently\)\{0,1\}\(hourly\)\{0,1\}\(daily\)\{0,1\}\(monthly\)\{0,1\} > > > #shadow:delimiter = _ > > > shadow:sort = desc > > > shadow:localtime = no > > > I've also tried it with the delimiter line uncommented (and then removing the underscore from the snapprefix), I've tried putting the shadow:format syntax between quotation marks ("") as well, but it doesn't just show up in Windows. > > > I think that syntax should just work according to the manual. Why is it not working? > > > > What does log level 10 say ? > > > > To unsubscribe from this list go to the following URL and read the > > instructions: https://lists.samba.org/mailman/options/samba
On Sun, Sep 1, 2019 at 3:24 PM douxevip via samba <samba at lists.samba.org> wrote:> > The location of the shared folder: /pool/shadowtest > > The location of the snapshots: /pool/shadowtest/.zfs/snapshot > > Here are how snapshots are named: > > > > autosnap_2019-09-01_13:29:01_daily > > autosnap_2019-09-01_13:29:01_hourly > > autosnap_2019-09-01_13:44:09_frequently > >I'm not saying this is what your problem is, but if this is FreeBSD < 12, then MNAMELEN in mount.h is 88. FreeBSD 12 bumps this limit to 1024. This means that you should be wary of automatic snapshot schemes that bump up toward this limit. Otherwise, the snapshots will not appear in shadow_copy2. One way to quickly tell if you're hitting the limit is to "cd" into the snapdir and "ls -l". If you've hit it then it will fail with ENAMETOOLONG.
On 01/09/2019 20:20, douxevip via samba wrote:> Hi Jeremy, > > Here's the log with log level 10: https://pastebin.com/0EAuz2B8 > > The location of the shared folder: /pool/shadowtest > The location of the snapshots: /pool/shadowtest/.zfs/snapshot > Here are how snapshots are named: > > autosnap_2019-09-01_13:29:01_daily > autosnap_2019-09-01_13:29:01_hourly > autosnap_2019-09-01_13:44:09_frequently > > > And this is currently in my smb.conf file: > > > [shadowtest] > path = /pool/shadowtest > valid users = user1 > read only = no > writeable = yes > guest ok = no > create mode = 770 > directory mode = 770 > vfs objects = shadow_copy2 > shadow:snapdir = /skyhawk2x4tb/shadowtest/.zfs/snapshot > shadow:snapprefix = ^autosnap_ > shadow:format = %Y-%m-%d_%H:%M:%S_\(frequently\)\{0,1\}\(hourly\)\{0,1\}\(daily\)\{0,1\}\(monthly\)\{0,1\} > shadow:delimiter = _ > shadow:sort = desc > shadow:localtime = noI know you have posted the share from smb.conf, but what is in the [global] portion ? Rowland