Disabling snapshot symlinks during manual snapshot

Patrick Georgi patrick.georgi at coresystems.de
Sat Apr 24 14:46:47 PDT 2010


Am 22.04.2010 07:30, schrieb Siju George:
> The pfs is mounted inside the snapshot Directory.
> 
> For a MS Windows user it will look like the actual pic below.
> 
> http://picasaweb.google.com/sgeorge.ml/OpenBSDDesktop#5462824618389365522
> 
> Clicking on the snapshot Directory they can get the snapshot contents :-)
Your mail (and the mention on the digest) inspired me to try to
configure samba's shadow_copy2 VFS module to match.

It required me to build a newer samba than what exists in pkgsrc due to
certain bugs in string handling (I built 3.5.2), and configure it
appropriately. The result is this:
http://img16.imageshack.us/img16/9652/hammersnapshotsoversamb.png
Current state of the share is seen on the left, an old version on the
right, and the shadow copy tab shows the snapshots available on the server.

What I had to configure in samba:
[global]
# allow symlinks to point "outside" the share (even though they aren't,
# but it seems the virtual directories to access snapshots by TID
# confuse samba)
widelinks = yes
# widelinks are disabled if unix extensions are enabled
unix extensions = no

[each share]
vfs objects = shadow_copy2
shadow: snapdir = /var/hammer/<pfs>

The snapshots' names must match "@GMT-%Y.%m.%d-%H.%M", but there's a
patch (that already seems to be in upstream) to allow configurable
naming schemes. With this and
shadow: format = snap-%Y%m%d-%H%M
shadow: localtime = yes
samba will know about standard snapshot names.

It's still a bit rough around the edges, but it looks like a good
starting point for full integration of snapshots with shadow copies.


Regards,
Patrick Georgi





More information about the Users mailing list