Edouard Guigné
2018-Feb-16 16:50 UTC
[Samba] vfs_shadow_copy2 with snapprefix & delimiter options in samba 4.6.2
Hello Dear Samba Users, I have sucessfully set a samba share on a centos 7 box (samba 4.6.2) and succeeded into make work snapshots (vfs_shadow_copy2 with xfs and lvm). The snapshots appears well in windows previous versions. However, I expected to go further with snapshots and use the options "shadow:snapprefix" and "shadow:delimiter"in order to filter daily, weekly snapshots... I did not succeed to do it ; nothing is displayed in windows previous versions when "shadow:snapprefix" and "shadow:delimiter" are set. My snapshots are with the following format, e.g. for daily snapshots : daily_IPG_%Y.%m.%d-%H.%M.%S I tried shadow:snapprefix = ^d[A-Za-z0-9]*y$ shadow:delimiter = _IPG_ shadow:format = %Y.%m.%d-%H.%M.%S I find an example at https://access.redhat.com/documentation/en-us/red_hat_gluster_storage/3.3/html/administration_guide/sect-smb and I also notice that there is a bug : https://bugzilla.redhat.com/show_bug.cgi?id=1329716 https://lists.samba.org/archive/samba/2017-April/207869.html May you help me to configure snapprefix and delimiter options ? Best Regards, Ed
Michael Miller
2018-Feb-16 18:26 UTC
[Samba] vfs_shadow_copy2 with snapprefix & delimiter options in samba 4.6.2
Hi, As per the list.samba.org link, did you try including the delimiter within the format, ie as shown in the following? shadow:snapprefix = ^d[A-Za-z0-9]*y$ shadow:delimiter = _IPG_ shadow:format = _IPG_%Y.%m.%d-%H.%M.%S Regards, Mike On 16/02/2018 16:50, Edouard Guigné via samba wrote:> Hello Dear Samba Users, > > I have sucessfully set a samba share on a centos 7 box (samba 4.6.2) > and succeeded into make work snapshots (vfs_shadow_copy2 with xfs and > lvm). > The snapshots appears well in windows previous versions. > > However, I expected to go further with snapshots and use the options > "shadow:snapprefix" and "shadow:delimiter"in order to filter daily, > weekly snapshots... > I did not succeed to do it ; nothing is displayed in windows previous > versions when "shadow:snapprefix" and "shadow:delimiter" are set. > > My snapshots are with the following format, e.g. for daily snapshots : > daily_IPG_%Y.%m.%d-%H.%M.%S > I tried > shadow:snapprefix = ^d[A-Za-z0-9]*y$ > shadow:delimiter = _IPG_ > shadow:format = %Y.%m.%d-%H.%M.%S > > I find an example at > https://access.redhat.com/documentation/en-us/red_hat_gluster_storage/3.3/html/administration_guide/sect-smb > and I also notice that there is a bug : > https://bugzilla.redhat.com/show_bug.cgi?id=1329716 > https://lists.samba.org/archive/samba/2017-April/207869.html > > May you help me to configure snapprefix and delimiter options ? > > Best Regards, > Ed
Michael Miller
2018-Feb-17 11:26 UTC
[Samba] vfs_shadow_copy2 with snapprefix & delimiter options in samba 4.6.2
Hi (+mailing list again for the archives) My config which does show previous versions: # /usr/local/samba/sbin/smbd --version Version 4.6.11 To avoid having this config block within in each share, I define the following within the [global] section: shadow:snapprefix = ^\(monthly\)\{0,1\}\(weekly\)\{0,1\}\(daily\)\{0,1\}$ shadow:delimiter = _UTC_ shadow:format = _UTC_%Y.%m.%d-%H.%M.%S And then in the config of the shares, I define: [someshare] vfs objects = acl_xattr btrfs shadow_copy2 writable = yes path = /store/samba/someshare shadow:basedir = /store/samba/someshare shadow:snapdir = /store/samba/someshare_SNAPS shadow:sort = desc shadow:fixinodes = yes Within /store/samba/someshare_SNAPS are the snapshot directories themselves: # ls -1f /store/samba/someshare_SNAPS |tail -20 weekly_UTC_2018.01.29-01.00.01 daily_UTC_2018.01.30-01.00.01 daily_UTC_2018.01.31-01.00.02 monthly_UTC_2018.02.01-01.00.02 daily_UTC_2018.02.02-01.00.02 daily_UTC_2018.02.03-01.00.02 daily_UTC_2018.02.04-01.00.01 weekly_UTC_2018.02.05-01.00.01 daily_UTC_2018.02.06-01.00.01 daily_UTC_2018.02.07-01.00.01 daily_UTC_2018.02.08-01.00.01 daily_UTC_2018.02.09-01.00.01 daily_UTC_2018.02.10-01.00.02 daily_UTC_2018.02.11-01.00.01 weekly_UTC_2018.02.12-01.00.01 daily_UTC_2018.02.13-01.00.01 daily_UTC_2018.02.14-01.00.01 daily_UTC_2018.02.15-01.00.01 daily_UTC_2018.02.16-01.00.01 daily_UTC_2018.02.17-01.00.01 This config works for me. It is possible that the regex you're trying to use is not fully basic regular expression compliant. I'm no expert on this, but ran into problems myself when trying to come up with a working expression. On 17/02/2018 01:07, eguigne at pasteur-cayenne.fr wrote:> Hello, > > I tried this also, unfortunatly it does not work better. > > I did not find many examples of usage with this options. > Did you succeeded to make it work ? > If yes, what was your configuration ? > > Regards, > Ed > >> Hi, >> >> As per the list.samba.org link, did you try including the delimiter >> within the format, ie as shown in the following? >> >> shadow:snapprefix = ^d[A-Za-z0-9]*y$ >> shadow:delimiter = _IPG_ >> shadow:format = _IPG_%Y.%m.%d-%H.%M.%S >> >> Regards, >> Mike >> On 16/02/2018 16:50, Edouard Guigné via samba wrote: >>> Hello Dear Samba Users, >>> >>> I have sucessfully set a samba share on a centos 7 box (samba 4.6.2) >>> and succeeded into make work snapshots (vfs_shadow_copy2 with xfs and >>> lvm). >>> The snapshots appears well in windows previous versions. >>> >>> However, I expected to go further with snapshots and use the options >>> "shadow:snapprefix" and "shadow:delimiter"in order to filter daily, >>> weekly snapshots... >>> I did not succeed to do it ; nothing is displayed in windows previous >>> versions when "shadow:snapprefix" and "shadow:delimiter" are set. >>> >>> My snapshots are with the following format, e.g. for daily snapshots : >>> daily_IPG_%Y.%m.%d-%H.%M.%S >>> I tried >>> shadow:snapprefix = ^d[A-Za-z0-9]*y$ >>> shadow:delimiter = _IPG_ >>> shadow:format = %Y.%m.%d-%H.%M.%S >>> >>> I find an example at >>> https://access.redhat.com/documentation/en-us/red_hat_gluster_storage/3.3/html/administration_guide/sect-smb >>> and I also notice that there is a bug : >>> https://bugzilla.redhat.com/show_bug.cgi?id=1329716 >>> https://lists.samba.org/archive/samba/2017-April/207869.html >>> >>> May you help me to configure snapprefix and delimiter options ? >>> >>> Best Regards, >>> Ed >> >> >
Anoop C S
2018-Feb-19 05:28 UTC
[Samba] vfs_shadow_copy2 with snapprefix & delimiter options in samba 4.6.2
On Fri, 2018-02-16 at 18:26 +0000, Michael Miller via samba wrote:> Hi, > > As per the list.samba.org link, did you try including the delimiter > within the format, ie as shown in the following? > > shadow:snapprefix = ^d[A-Za-z0-9]*y$ > shadow:delimiter = _IPG_ > shadow:format = _IPG_%Y.%m.%d-%H.%M.%SYes. Please try after including delimiter within shadow:format. It should work.> Regards, > Mike > On 16/02/2018 16:50, Edouard Guigné via samba wrote: > > Hello Dear Samba Users, > > > > I have sucessfully set a samba share on a centos 7 box (samba 4.6.2) > > and succeeded into make work snapshots (vfs_shadow_copy2 with xfs and > > lvm). > > The snapshots appears well in windows previous versions. > > > > However, I expected to go further with snapshots and use the options > > "shadow:snapprefix" and "shadow:delimiter"in order to filter daily, > > weekly snapshots... > > I did not succeed to do it ; nothing is displayed in windows previous > > versions when "shadow:snapprefix" and "shadow:delimiter" are set. > > > > My snapshots are with the following format, e.g. for daily snapshots : > > daily_IPG_%Y.%m.%d-%H.%M.%S > > I tried > > shadow:snapprefix = ^d[A-Za-z0-9]*y$ > > shadow:delimiter = _IPG_ > > shadow:format = %Y.%m.%d-%H.%M.%S > > > > I find an example at > > https://access.redhat.com/documentation/en-us/red_hat_gluster_storage/3.3/html/administration_gu > > ide/sect-smb > > and I also notice that there is a bug : > > https://bugzilla.redhat.com/show_bug.cgi?id=1329716 > > https://lists.samba.org/archive/samba/2017-April/207869.html > > > > May you help me to configure snapprefix and delimiter options ? > > > > Best Regards, > > Ed > >
sambaorg at e.mjmm.org
2018-Feb-19 07:53 UTC
[Samba] vfs_shadow_copy2 with snapprefix & delimiter options in samba 4.6.2
Hi, I notice you're using 4.6.2 and I'm using 4.6.11. I made the following comment at some point within [global]: #disable "unix extensions" to avoid using "allow insecure wide links" # for access to ../xxxx_SNAPS for BTRFS "previous versions" snapshots # --it seems to have reverted once more to not need the below two settings ##unix extensions = no ##wide links = yes ##allow insecure wide links = yes I don't know when the behaviour changed allowing me to remove the above. At some point I needed (some of??) the above to allow snapshots to work. Obviously these may introduce other issues in your setup, so best to check in https://www.samba.org/samba/docs/current/man-html/smb.conf.5.html to understand the implications of allowing wide links. Regards, Mike On 18/02/2018 01:12, Edouard Guigné wrote:> Hi, > > So I tried with a similar config to yours : > > vfs objects = acl_xattr streams_xattr shadow_copy2 > shadow:snapdir = /data/datashared/.snapshots > shadow:basedir = /var/datashared > shadow:sort = desc > shadow:localtime = yes > shadow:snapprefix = > ^\(monthly\)\{0,1\}\(weekly\)\{0,1\}\(daily\)\{0,1\}$ > shadow:delimiter = _UTC_ > shadow:format = _UTC_%Y.%m.%d-%H.%M.%S > shadow:fixinodes = yes > > (I change IPG by UTC in case...) > > This does not work better... > I notice you put btrfs in vfs objects > I am using xfs + lvm (for snapshots). Do i have to add something > special in vfs objects for this file system ? > > Regards, > Ed > > > Le 17/02/2018 à 08:26, Michael Miller a écrit : >> Hi >> >> (+mailing list again for the archives) >> >> My config which does show previous versions: >> >> # /usr/local/samba/sbin/smbd --version >> Version 4.6.11 >> >> To avoid having this config block within in each share, I define the >> following within the [global] section: >> >> shadow:snapprefix = >> ^\(monthly\)\{0,1\}\(weekly\)\{0,1\}\(daily\)\{0,1\}$ >> shadow:delimiter = _UTC_ >> shadow:format = _UTC_%Y.%m.%d-%H.%M.%S >> >> And then in the config of the shares, I define: >> >> [someshare] >> vfs objects = acl_xattr btrfs shadow_copy2 >> writable = yes >> path = /store/samba/someshare >> shadow:basedir = /store/samba/someshare >> shadow:snapdir = /store/samba/someshare_SNAPS >> shadow:sort = desc >> shadow:fixinodes = yes >> >> Within /store/samba/someshare_SNAPS are the snapshot directories >> themselves: >> >> # ls -1f /store/samba/someshare_SNAPS |tail -20 >> weekly_UTC_2018.01.29-01.00.01 >> daily_UTC_2018.01.30-01.00.01 >> daily_UTC_2018.01.31-01.00.02 >> monthly_UTC_2018.02.01-01.00.02 >> daily_UTC_2018.02.02-01.00.02 >> daily_UTC_2018.02.03-01.00.02 >> daily_UTC_2018.02.04-01.00.01 >> weekly_UTC_2018.02.05-01.00.01 >> daily_UTC_2018.02.06-01.00.01 >> daily_UTC_2018.02.07-01.00.01 >> daily_UTC_2018.02.08-01.00.01 >> daily_UTC_2018.02.09-01.00.01 >> daily_UTC_2018.02.10-01.00.02 >> daily_UTC_2018.02.11-01.00.01 >> weekly_UTC_2018.02.12-01.00.01 >> daily_UTC_2018.02.13-01.00.01 >> daily_UTC_2018.02.14-01.00.01 >> daily_UTC_2018.02.15-01.00.01 >> daily_UTC_2018.02.16-01.00.01 >> daily_UTC_2018.02.17-01.00.01 >> >> This config works for me. It is possible that the regex you're trying >> to use is not fully basic regular expression compliant. I'm no expert >> on this, but ran into problems myself when trying to come up with a >> working expression. >> >> >> On 17/02/2018 01:07, eguigne at pasteur-cayenne.fr wrote: >>> Hello, >>> >>> I tried this also, unfortunatly it does not work better. >>> >>> I did not find many examples of usage with this options. >>> Did you succeeded to make it work ? >>> If yes, what was your configuration ? >>> >>> Regards, >>> Ed >>> >>>> Hi, >>>> >>>> As per the list.samba.org link, did you try including the delimiter >>>> within the format, ie as shown in the following? >>>> >>>> shadow:snapprefix = ^d[A-Za-z0-9]*y$ >>>> shadow:delimiter = _IPG_ >>>> shadow:format = _IPG_%Y.%m.%d-%H.%M.%S >>>> >>>> Regards, >>>> Mike >>>> On 16/02/2018 16:50, Edouard Guigné via samba wrote: >>>>> Hello Dear Samba Users, >>>>> >>>>> I have sucessfully set a samba share on a centos 7 box (samba 4.6.2) >>>>> and succeeded into make work snapshots (vfs_shadow_copy2 with xfs and >>>>> lvm). >>>>> The snapshots appears well in windows previous versions. >>>>> >>>>> However, I expected to go further with snapshots and use the options >>>>> "shadow:snapprefix" and "shadow:delimiter"in order to filter daily, >>>>> weekly snapshots... >>>>> I did not succeed to do it ; nothing is displayed in windows previous >>>>> versions when "shadow:snapprefix" and "shadow:delimiter" are set. >>>>> >>>>> My snapshots are with the following format, e.g. for daily >>>>> snapshots : >>>>> daily_IPG_%Y.%m.%d-%H.%M.%S >>>>> I tried >>>>> shadow:snapprefix = ^d[A-Za-z0-9]*y$ >>>>> shadow:delimiter = _IPG_ >>>>> shadow:format = %Y.%m.%d-%H.%M.%S >>>>> >>>>> I find an example at >>>>> https://access.redhat.com/documentation/en-us/red_hat_gluster_storage/3.3/html/administration_guide/sect-smb >>>>> >>>>> and I also notice that there is a bug : >>>>> https://bugzilla.redhat.com/show_bug.cgi?id=1329716 >>>>> https://lists.samba.org/archive/samba/2017-April/207869.html >>>>> >>>>> May you help me to configure snapprefix and delimiter options ? >>>>> >>>>> Best Regards, >>>>> Ed >>>> >>>> >>> >> >> >
Maybe Matching Threads
- vfs_shadow_copy2 with snapprefix & delimiter options in samba 4.6.2
- vfs_shadow_copy2 with snapprefix & delimiter options in samba 4.6.2
- vfs_shadow_copy2 delimiter not working
- vfs_shadow_copy2 with snapprefix & delimiter options in samba 4.6.2
- vfs_shadow_copy2 with snapprefix & delimiter options