shadow_copy2 Enhancements

Ed Plese ed at edplese.com
Wed Dec 2 22:26:41 MST 2009


Hi,

Attached is a patch for the shadow_copy2 module that adds flexibility
with regards to the naming of snapshots.  The patch is against 3.4.3
and a version against the git repository is in progress.

The parameters added are:

shadow:sort = asc/desc, or blank for unsorted (default)

This is an optional parameter that specifies that the shadow
copy directories should be sorted before sending them to the
client.  This is beneficial for filesystems that don't read
directories alphabetically (e.g. ZFS).  If enabled, you typically
want to specify descending order.

shadow:format = <format specification for snapshot names>

This is an optional parameter that specifies the format
specification for the naming of snapshots.  The format must
be compatible with the conversion specifications recognized
by str[fp]time.  The default value is "@GMT-%Y.%m.%d-%H.%M.%S".

shadow:localtime = yes/no (default is no)

This is an optional parameter that indicates whether the
snapshot names are in UTC/GMT or the local time.


Example usage with ZFS for the [homes] share is:

[homes]
   comment = Home Directories
   browseable = no
   writable = yes
   vfs objects = shadow_copy2
   shadow: snapdir = .zfs/snapshot
   shadow: sort = desc
   shadow: localtime = yes
   shadow: format = %Y%m%d-%H%M%S


Any feedback or comments are welcome!

Thanks,

Ed Plese
-------------- next part --------------
A non-text attachment was scrubbed...
Name: samba-3.4.3-shadowcopy.patch.gz
Type: application/x-gzip
Size: 2871 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20091202/2543cfdc/attachment.bin>


More information about the samba-technical mailing list