[Samba] VFS shadowcopy2 with FeeBSD & ZFS

O'Connor, Daniel darius at dons.net.au
Mon Oct 5 07:00:03 UTC 2020

I have a FreeBSD 12.1 system with Samba 4.11.8 using ZFS and I want to get shadow copies working, however the clients (Windows 10) don't show anything in the 'previous versions' tab. I think it's doing something as it say 'working' for a short amount of time. Also if I crank up vfs debugging to 10 I get:
[2020/10/05 16:50:03.879093, 10, pid=50572, effective(0, 0), real(0, 0), class=vfs] ../../source3/smbd/vfs.c:65(vfs_find_backend_entry)
  vfs_find_backend_entry called for shadow_copy2
  Successfully loaded vfs module [shadow_copy2] with the new modules system
[2020/10/05 16:50:12.483055, 10, pid=50572, effective(3000037, 20), real(0, 0), class=vfs] ../../source3/modules/vfs_default.c:1327(vfswrap_fsctl)
  FSCTL_GET_SHADOW_COPY_DATA: 0 volumes for path[Program Files].

The share configuration is done like so:

        comment = Public
        path = /public
        read only = no
        public = yes
        vfs objects = zfsacl shadow_copy2
        shadow:snapdir = .zfs/snapshot
        shadow:format = zrepl_%Y%m%d_%H%M%S_000
        shadow:localtime = no
        shadow:sort = desc
        acl allow execute always = yes
        map acl inherit = yes
        store dos attributes = yes

ie it is mounted at /public, and snapshots are under /public/.zfs/snapshot and called things like 'zrepl_20201005_063741_000' and are in UTC.

Is there a way I can get some more debugging out of the shadow_copy2 module (or can someone point out my mistake :) ?


Daniel O'Connor
"The nice thing about standards is that there
are so many of them to choose from."
 -- Andrew Tanenbaum

More information about the samba mailing list