Snapshots ordering on slave and pfs according to freequency for snapshot management

Siju George sgeorge.ml at gmail.com
Wed Apr 28 03:30:26 PDT 2010


On Tue, Apr 27, 2010 at 7:26 AM, Matthew Dillon
<dillon at apollo.backplane.com> wrote:
>
>    hammer cleanup only removes snapshots over X days old.  It can't
>    distinguish between fine-grained and coarse-grained snapshots
>    that you explicitly tell hammer to make.  You would have to remove
>    those yourself (if you want to expire them before the X days)
>    using hammer snaprm.
>
>    You can script it fairly easily by setting the comment field for
>    each snapshot you take, then filtering out the list based on that.
>    See the manual page.
>

Yes the comment field was in my mind. I thought of entering the output of

#date -j -f "%a %b %d %T %Z %Y" "`date`" "+%s"

to the comments field of the snapshots.

Then the script will prune snapshots that have the commentfield 172800
less than the current value of the date by seconds from epoch.

But then I thought it is easier to rsync from the master pfs in disk1
after the 5 mins snapshots to another master pfs in disk2 and let
periodic take daily snapshots of the pfs in disk1 for now :-)

Thanks for the idea!

--Siju






More information about the Users mailing list