[Samba] vfs_shadow_copy2 with different snapshot format

Lee Allen lee at leecallen.com
Mon Jan 27 15:02:30 MST 2014

I have been working my way through this zfs-auto-snapshot code (bash script
really) and it's not possible to change the naming to something consistent
across daily/hourly/frequent snapshots.  It uses that part of the name to
determine whether to retain the snapshot.  I.e., it knows it needs to keep
7 daily snapshots, so it keeps 7 snapshots that contain the word 'daily'.

I guess the fix would be, (1) name all snapshots using a consistent text
string plus the date format, and then (2) change the snapshot cleanup
routine to identify daily/hourly/frequent snapshots based on their
timestamps, not their names.

Thanks Sabuj.

On Mon, Jan 27, 2014 at 3:51 PM, Sabuj Pattanayek <sabujp at gmail.com> wrote:

> Under Windows my 'Restore previous versions' shows only previous versions
>> for today, as the OP also experienced.  I have been intentionally
>> modifying
>> this file a couple times a day for the past 2 days.
> My issue is slightly different and I don't think there's a way to do what
> you're trying to do unless you modify the way that your zfs-auto-snapshot
> package is creating snapshot names, or add an option in the
> vfs_shadow_copy2 parameters for something like shadow:regexpformat where
> you can put a posix or pcre regex into the format. The other option may be
> symlinks, but not sure if you can create symlinks in the zfs snapshots
> directories.

*Lee Allen*
email: lee at leecallen.com
bus: (404) 698-1801
home: (716) 773-2326
cell: (716) 880-0854
fax: (716) 408-8844

More information about the samba mailing list