[Samba] shadow copy source

Piviul piviul at riminilug.it
Mon Oct 10 12:57:22 UTC 2022

On 07/10/22 15:28, Nick Couchman via samba wrote:
> I would think this would be possible, yes, you'd just need to make
> sure that the rsync snapshots are put into a standard naming
> convention that can be translated by the vfs_shadow_copy2 module the
> date/time options it will present to Windows. You need the right
> combination of the following options to parse out those rsync
> directories:
> shadow:snapdir
> shadow:sort
> shadow:format
> shadow:snapprefix
> shadow:delimiter

I never used shadow_copy2 VFS module... the rsync snapshots are in a nfs 
share. I have mounted it on /home/shares-snapshots. The format I use is 
the default value of shadow format value ("@GMT-%Y.%m.%d-%H.%M.%S"). 
This is the content:

$ ls /home/shares-snapshots/
@GMT-2022.10.07-05.25.01         @GMT-2022.10.07-11.07.01 
@GMT-2022.10.07-14.07.01         @GMT-2022.10.07-17.07.01 
@GMT-2022.10.07-05.25.01.log.gz  @GMT-2022.10.07-11.07.01.log.gz 
@GMT-2022.10.07-14.07.01.log.gz  @GMT-2022.10.07-17.07.01.log.gz 
@GMT-2022.10.07-09.07.01         @GMT-2022.10.07-12.07.01 
@GMT-2022.10.07-15.07.01         @GMT-2022.10.10-09.07.01 
@GMT-2022.10.07-09.07.01.log.gz  @GMT-2022.10.07-12.07.01.log.gz 
@GMT-2022.10.07-15.07.01.log.gz  @GMT-2022.10.10-09.07.01.log.gz 
@GMT-2022.10.07-10.07.01         @GMT-2022.10.07-13.07.02 
@GMT-2022.10.07-16.07.02         @GMT-2022.10.10-10.07.01 latest
@GMT-2022.10.07-10.07.01.log.gz  @GMT-2022.10.07-13.07.02.log.gz 
@GMT-2022.10.07-16.07.02.log.gz  @GMT-2022.10.10-10.07.01.log.gz

for each hourly snapshot I have a log.gz file and a symbolic link named 
latest that point to the latest snapshot. This structure should be 
compatible is'nt it?

So I have added to the smb.conf share section something like:

     vfs objects = shadow_copy2
     shadow:snapdir = /home/shares-snapshots
     shadow:sort = desc
     # shadow:format = @GMT-%Y.%m.%d-%H.%M.%S

I haven't set the shadow:delimiter and  shadow:snapprefix I haven't 
understand how to set them... any way are not mandatory, aren't they? 
Well, I have reload samba but from windows in the file properties no 
versions are available... what I wrong?



More information about the samba mailing list