[Samba] vfs_shadow_copy2 not working

douxevip douxevip at protonmail.com
Sun Sep 1 19:20:48 UTC 2019


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





More information about the samba mailing list