On Fri, Oct 7, 2022 at 9:00 AM Piviul via samba <samba at lists.samba.org> wrote:> > Hi all, I use rsync snapshots to backup some shares. Each backup is a > folder containing the same tree structure of the share where each file > is a hard link if it is not changed from the previous snapshot. That's > the big question: it is possibile use rsync snapshots as a source of > samba VFS shadow copies? >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 -Nick
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:delimiterI 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.10-11.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.10-11.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.10-12.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.10-12.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? :( Piviul