[Samba] vfs_shadow_copy2 with different snapshot format

Lee Allen lee at leecallen.com
Tue Feb 18 04:18:47 MST 2014


Sabuj, your setup looks correct to me, it looks like it should work.

Linda, your solution seems brilliant.

My original problem was with the zfs-auto-snapshot script. It embeds a
variable word into the snapshot name indicating the snapshot frequency. The
samba mechanism cannot handle this (without doing something similar to what
Linda has done).

I have modified zfs-auto-snapshot to take that word out of the snapshot
name and instead store it as a zfs user property. That solution works well
for me. I have submitted the change to the zfs-auto-snapshot maintainer. I
don't know whether it will be accepted as it would cause problems for
existing installations (pre-existing snapshots with the old naming
convention would not be cleaned up).

Linda I might still do what you described to make the snapshots dirrectly
accessible to the users.

Lee

On Tuesday, February 18, 2014, Linda W <samba at tlinx.org> wrote:

> Lee Allen wrote:
>
>> 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.
>>
>
> ----
> I use my snapshots from windows with the dirnames of the form:
> @GMT-2014.02.17-03.07.16
> -- I have different parts of my /home partition exported in different
> ways (Documents, home, homes, et al. )
> At the root of each I create a .snapdir and after I create daily snaps
> with 'lvm', a finish-up bash script creates symlinks to all the dirs
> in the real snapdir -- that way windows restore earlier versions feature
> works in the other directories (usually).
>
> Would creating a 'fakedir' for windows with a script creating symlinks to
> the real snapshots off a cron job work?
>
>
>

-- 
*Lee Allen*
email: lee at leecallen.com
cell: (716) 880-0854
fax: (716) 408-8844


More information about the samba mailing list