undo man page on DragonFly

Man page or keyword search:  
man Server   44335 pages
apropos Keyword Search (all sections)
Output format
DragonFly logo
[printable version]

UNDO(1)			  BSD General Commands Manual		       UNDO(1)

NAME
     undo — Undo changes made to files on HAMMER filesystems

SYNOPSIS
     undo [-adDiuv] [-o outfile] [-t transaction-id] [-t transaction-id]
	  file ...

DESCRIPTION
     The undo utility acquires an older version of the specified files and can
     output them to stdout, generate a file with the previous contents, or
     generate a diff to stdout.	 A history can also be generated.

     The options are as follows:

     -d	     Generate a unified diff from the older version to the current
	     version.

     -D	     Generate a unified diff from the current version to the older
	     version.

     -i	     Generate a single line giving the transaction id and converted
	     timestamp of the version of the file requested, rather than dump‐
	     ing the contents of the file.

     -a	     Iterate through the file's entire history generating undo files,
	     diffs, output, etc.  Note that due to the way file creation is
	     laid down a file may appear to be zero-filled just after creation
	     before the data is actually synced.  There will be a later ver‐
	     sion with the synced data.	 This is a known bug.

     -u	     Output to a file with name synthesized from the input filename
	     postfixed with ".undo".  If not specified output is either to
	     stdout or, if a single file argument is given, the file specified
	     by the -o option.

     -v	     Increase verboseness.

     -o outfile
	     Output to the specified file instead of to stdout.	 If iterating
	     through a file's entire history outfile will be postfixed with an
	     iteration number in the form "outfile.%04d".  If multiple files
	     are specified outfile is used as a template where '%s' is
	     replaced with the last component of each file path.  When used
	     with multiple files '%%' must be used in the outfile specifica‐
	     tion to indicate a '%'.  When used with a single file the outfile
	     string is used verbatim.

     -t transaction-id
	     Specify how far to go back in time, by giving a HAMMER transac‐
	     tion id (0x16chars).  If not specified the program will attempt
	     to locate the most recent version of the file(s) prior to the
	     current version.  This option does not apply if -a is specified.

	     A second -t specification may be given to provide two end-points
	     for a diff, and will imply -d unless overridden.

	     Transaction ids always start with "0x".  A simple index may be
	     specified instead of a transaction id where 0 indicates the lat‐
	     est version and increasing values indicate older versions.

EXIT STATUS
     The undo utility exits 0 on success, and >0 if an error occurs.

EXAMPLES
     undo -d mytextfile

     undo -o mytextfile.old mytextfile

DIAGNOSTICS
     Warning: fake transaction id 0x...	 While locating past versions of the
     file, undo came across a fake transaction id, which are automatically
     generated by hammer(5) in case the file's directory entry and inode got
     bisected in the past.

SEE ALSO
     hammer(8)

HISTORY
     The undo utility first appeared in DragonFly 1.13.

AUTHORS
     Matthew Dillon ⟨dillon@backplane.com⟩

BUGS
     HAMMER only synchronizes information to disk every 30 seconds or so and a
     quick file create / delete is done entirely in system memory and cannot
     be undone.	 This can be worked around by running “hammer synctid
     filesystem”.

BSD			       November 16, 2009			   BSD
[top]

List of man pages available for DragonFly

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net