HAMMER update 23-Mar-08

Matthew Dillon dillon at apollo.backplane.com
Mon Mar 24 22:34:15 PDT 2008


:So is it needed to run hammer now in order to "create" a snapshot? What would 
:I do in situation like this: got a hammer filesystem and couple of the files 
:change on day to day basis. Then a week later I needed to access one of the 
:files, in exactly the state they were 7 days ago.
:
:Cheers,
:Petr

    No, you do not have to run 'hammer now' to create a snapshot.  The
    kernel syncs all filesystems every 30 seconds, so if you do nothing
    at all you get a snapshot granularity of 30 seconds.

    Where you would use 'hammer now' is if you wanted the most current
    snapshot possible for the purpose of, say, backing up your filesystem
    to another machine.  You might do something like this:

	set timestamp = `hammer now`
	cpdup /mountpoint/@@$timestamp targethost:/somepath

    But if you didn't care about that you could just go back far enough
    that you get a stable historical view... e.g. go back 1 minute and you
    would have a stable view into your filesystem.

	set timestamp = `hammer stamp 60s`		<------ doesn't sync
	cpdup /mountpoint/@@$timestamp targethost:/somepath


    Ultimately the idea of managing filesystems this way is to still do
    regular backups from your production machine to your backup machine
    (ultimately by way of replication), with both running HAMMER, but only
    retain a limited amount of history on the production box.  You might
    desire to retain only one week's worth of history on the production box,
    retain one month's history on your local backup box, and retain a very
    granular one year's worth of history on your remote backup box.

    Come to think of it, I should add some more directives to the
    'hammer prune' command to make that easier to specify.

    Until I implement a live replication 'feed' the minimum granularity on
    the backup box will be how often you do your backups (e.g. once a day),
    and you can prune it into more granular forms from that starting point.
    Once we have a live replication feed the backup box will have the same
    30-second granularity that the production machine has.

    A major bullet point for this style of management is that the retention
    policy on the various boxes can be different even though they are
    all slaved off the same production filesystem.

					-Matt
					Matthew Dillon 
					<dillon at backplane.com>





More information about the Kernel mailing list