[Samba] Sama + Windows Shadow Copies

Rowland Penny rpenny at samba.org
Tue Feb 12 09:18:53 UTC 2019


See inline comments:

On Tue, 12 Feb 2019 08:49:07 +0100
Anton Blau via samba <samba at lists.samba.org> wrote:

> Hello,
> 
> i installed zfs-auto-snapshot with Samba/Windows Shadow Copy. If the 
> share contains "path = /srv/userdata/" it runs for me. But if I use 
> "path = /srv/userdata/%U" I get no "Previous Versions" on my Win10
> Client.
> 
> I think the problem is the variable "shadow: snapdir
> = .zfs/snapshot". I tried with "shadow: snapdir = ../.zfs/snapshot"
> and with "shadow: snapdir = /srv/userdata/.zfs/snapshot" but it
> does´t works for me.
> 
> How can I get the "Previous Versions" with path = /.../%U?
> 
> The files for Windows Shadow Copy are locatet
> in /srv/userdata/.zfs/snapshot
> 
> 
> Thank you!
> 
> Tony
> 
> This configuration in /etc/samba/smb.conf does not run for me:
> [Eigene_Dateien]
> comment = Eigene Dateien:
> path = /srv/userdata/%U  <--- I think this is the problem
> guest ok = no
> public = yes

Ever heard of synonyms ?

'Public' is a synonym for 'guest ok'
You have turned off guest access, then turned it back on again, last
one wins.

> browseable = yes
> create mode = 0700
> create mask = 0700
> directory mask = 0700
> valid users = %U

Are the shares being saved/owned by '%U'
This share (unless you missed a line) is read only.

> vfs objects = shadow_copy2
> shadow: snapdir = .zfs/snapshot
> shadow: sort = desc
> shadow: format = -%Y-%m-%d-%H%M
> shadow: snapprefix = 
> ^zfs-auto-snap_(frequent){0,1}(hourly){0,1}(daily){0,1}(monthly){
> 0,1}
> shadow: delimiter = -20
> 
> This configuration in /etc/samba/smb.conf runs. I get the "Previous 
> Versions" on my windows Client.
> [Eigene_Dateien2]
> comment = Eigene Dateien2
> path = /srv/userdata/ <--- here´s the difference
> guest ok = no
> public = yes
> browseable = yes
> writeable = yes
> read only = no
> create mode = 0700
> create mask = 0700
> directory mask = 0700
> valid users = %U
> vfs objects = shadow_copy2
> shadow: snapdir = .zfs/snapshot
> shadow: sort = desc
> shadow: format = -%Y-%m-%d-%H%M
> shadow: snapprefix = 
> ^zfs-auto-snap_(frequent){0,1}(hourly){0,1}(daily){0,1}(monthly){
> 0,1}
> shadow: delimiter = -20
> 
> 

Provided the file/folder ownership is correct, it should work, but I
cannot be sure if this is correct because you have made the mistake
that nearly everybody makes, you only posted part of your smb.conf, I
do not have a clue how you are running Samba because of this ;-)

Rowland



More information about the samba mailing list