man undo(1) - Undo changes made to files on HAMMER filesystems
Translations of this material:
- into Russian: man undo(1) - отмена изменений файлов в файловой системе HAMMER. Translation complete.
-
Submitted for translation by morbo 02.03.2009
Published 3 years, 2 months ago.
Text
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 dumping 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 version 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 specification 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 transaction 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 when the -d or -D option is used, to provide two end-points for the diff. The file as-of the second -t is used instead of the current version of the file.
EXAMPLES
undo -d mytextfile
undo -o mytextfile.old mytextfile
DIAGNOSTICS
Exit status is 0 on success and 1 on error.
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]''.
