cvs commit: src/sbin/hammer Makefile cmd_snapshot.c hammer.h hammer.c

Matthew Dillon dillon at apollo.backplane.com
Thu Jun 26 09:59:19 PDT 2008


:Matt, I went with strftime for ultimate flexibility on how
:the timestamp is formatted, so that the following works fine:
:
:   hammer snapshot "/mysnapshots/snap-%Y-%m-%dT%H:%M:%S"
:   hammer snapshot /obj "/mysnapshots/obj-%Y-%m-%dT%H:%M:%S"
:
:Regards,
:
:   Michael

    Ok... do you have a default?  If not, add one.  That is, make this
    generate something useful:

	hammer snapshot /mysnapshots
	hammer snapshot /obj /mysnapshots

    So if there are no '%'s in the snapshot directory specification, and
    the target path stats()'s to a directory, have the snapshot command
    automatically tag on a suitable softlink name like 
    "(path)/snap-%Y%m%d-%H%M".

    Ultimately we want to make these utility commands as simple as possible
    for the user, and yet still give him or her the option to do something
    more sophisticated.

					-Matt
					Matthew Dillon 
					<dillon at backplane.com>





More information about the Commits mailing list