* ChangeLog.1, ChangeLog.CVS, Makefile.am, NEWS, README: * README-hacking, directory, doc/Makefile.am, doc/dumpdir.texi: * doc/gendocs_template, doc/intern.texi, doc/mastermenu.el: * doc/snapshot.texi, doc/sparse.texi, doc/tar-snapshot-edit.texi: * doc/value.texi, lib/Makefile.am, scripts/backup-specs: * scripts/dump-remind.in, scripts/tar-snapshot-edit, scripts/tarcat: * scripts/xsparse.c, src/arith.h, src/buffer.c, src/compare.c: * src/create.c, src/delete.c, src/exit.c, src/suffix.c, src/tar.c: * src/tar.h, src/update.c, src/warning.c, src/xheader.c: * tests/append01.at, tests/append02.at, tests/atlocal.in: * tests/delete03.at, tests/exclude.at, tests/exclude06.at: * tests/extrac04.at, tests/extrac05.at, tests/extrac06.at: * tests/extrac07.at, tests/filerem01.at, tests/filerem02.at: * tests/incr01.at, tests/incr02.at, tests/incr03.at, tests/incr06.at: * tests/label02.at, tests/label03.at, tests/label04.at: * tests/label05.at, tests/link02.at, tests/link03.at: * tests/listed01.at, tests/listed02.at, tests/long01.at: * tests/longv7.at, tests/multiv01.at, tests/multiv02.at: * tests/multiv03.at, tests/multiv05.at, tests/multiv06.at: * tests/multiv07.at, tests/multiv08.at, tests/options.at: * tests/options02.at, tests/remfiles03.at, tests/rename01.at: * tests/rename02.at, tests/rename03.at, tests/rename04.at: * tests/rename05.at, tests/same-order01.at, tests/same-order02.at: * tests/shortfile.at, tests/shortupd.at, tests/sparse01.at: * tests/sparse02.at, tests/sparsemv.at, tests/sparsemvp.at: * tests/star/README, tests/star/gtarfail2.at: * tests/star/multi-fail.at: * tests/star/pax-big-10g.at, tests/star/quicktest.sh: * tests/star/ustar-big-2g.at, tests/star/ustar-big-8g.at: * tests/update01.at, tests/update02.at, tests/volsize.at: * tests/volume.at: Remove trailing spaces and tabs from lines, and remove trailing empty lines from files. This makes it a bit easier to share code among coreutils and other projects that do this.
140 lines
4.7 KiB
Plaintext
140 lines
4.7 KiB
Plaintext
@c This is part of the paxutils manual.
|
|
@c Copyright (C) 2005, 2007 Free Software Foundation, Inc.
|
|
@c Written by Sergey Poznyakoff
|
|
@c This file is distributed under GFDL 1.1 or any later version
|
|
@c published by the Free Software Foundation.
|
|
|
|
A @dfn{snapshot file} (or @dfn{directory file}) is created during
|
|
incremental backups (@pxref{Incremental Dumps}). It
|
|
contains the status of the file system at the time of the dump and is
|
|
used to determine which files were modified since the last backup.
|
|
|
|
@GNUTAR{} version @value{VERSION} supports three snapshot file
|
|
formats. The first format, called @dfn{format 0}, is the one used by
|
|
@GNUTAR{} versions up to 1.15.1. The second format, called @dfn{format
|
|
1} is an extended version of this format, that contains more metadata
|
|
and allows for further extensions. It was used by version
|
|
1.15.1. Starting from version 1.16 and up to @value{VERSION}, the
|
|
@dfn{format 2} is used.
|
|
|
|
@GNUTAR{} is able to read all three formats, but will create
|
|
snapshots only in format 2.
|
|
|
|
This appendix describes all three formats in detail.
|
|
|
|
@enumerate 0
|
|
@cindex format 0, snapshot file
|
|
@cindex snapshot file, format 0
|
|
@item
|
|
@samp{Format 0} snapshot file begins with a line containing a
|
|
decimal number that represents a @acronym{UNIX} timestamp of the
|
|
beginning of the last archivation. This line is followed by directory
|
|
metadata descriptions, one per line. Each description has the
|
|
following format:
|
|
|
|
@smallexample
|
|
@var{nfs}@var{dev} @var{inode} @var{name}
|
|
@end smallexample
|
|
|
|
@noindent
|
|
where:
|
|
|
|
@table @var
|
|
@item nfs
|
|
A single plus character (@samp{+}), if this directory is located on
|
|
an @acronym{NFS}-mounted partition, or a single space otherwise;
|
|
|
|
@item dev
|
|
Device number of the directory;
|
|
|
|
@item inode
|
|
I-node number of the directory;
|
|
|
|
@item name
|
|
Name of the directory. Any special characters (white-space,
|
|
backslashes, etc.) are quoted.
|
|
@end table
|
|
|
|
@cindex format 1, snapshot file
|
|
@cindex snapshot file, format 1
|
|
@item
|
|
@samp{Format 1} snapshot file begins with a line specifying the
|
|
format of the file. This line has the following structure:
|
|
|
|
@smallexample
|
|
@samp{GNU tar-}@var{tar-version}@samp{-}@var{incr-format-version}
|
|
@end smallexample
|
|
|
|
@noindent
|
|
where @var{tar-version} is the version number of @GNUTAR{}
|
|
implementation that created this snapshot, and
|
|
@var{incr-format-version} is the version number of the snapshot format
|
|
(in this case @samp{1}).
|
|
|
|
Next line contains two decimal numbers, representing the
|
|
time of the last backup. First number is the number of seconds, the
|
|
second one is the number of nanoseconds, since the beginning of the
|
|
epoch.
|
|
|
|
Lines that follow contain directory metadata, one line per
|
|
directory. Each line is formatted as follows:
|
|
|
|
@smallexample
|
|
[@var{nfs}]@var{mtime-sec} @var{mtime-nsec} @var{dev} @var{inode} @var{name}
|
|
@end smallexample
|
|
|
|
@noindent
|
|
where @var{mtime-sec} and @var{mtime-nsec} represent last
|
|
modification time of this directory with nanosecond precision;
|
|
@var{nfs}, @var{dev}, @var{inode} and @var{name} have the same meaning
|
|
as with @samp{format 0}.
|
|
|
|
@cindex format 2, snapshot file
|
|
@cindex snapshot file, format 2
|
|
@FIXME{}
|
|
@item
|
|
@samp{Format 2} snapshot file begins with a format identifier, as described for
|
|
version 1, e.g.:
|
|
|
|
@smallexample
|
|
GNU tar-@value{VERSION}-2
|
|
@end smallexample
|
|
|
|
This line is followed by newline. Rest of file consists of
|
|
records, separated by null (@acronym{ASCII} 0)
|
|
characters. Thus, in contrast to the previous formats, format 2
|
|
snapshot is a binary file.
|
|
|
|
First two records are decimal numbers, representing the
|
|
time of the last backup. First number is the number of seconds, the
|
|
second one is the number of nanoseconds, since the beginning of the
|
|
epoch. These are followed by arbitrary number of directory records.
|
|
|
|
Each @dfn{directory record} contains a set of metadata describing a
|
|
particular directory. Parts of a directory record are delimited with
|
|
@acronym{ASCII} 0 characters. The following table describes each
|
|
part. The @dfn{Number} type in this table stands for a decimal number
|
|
in @acronym{ASCII} notation.
|
|
|
|
@multitable @columnfractions 0.2 0.2 0.6
|
|
@headitem Field @tab Type @tab Description
|
|
@item nfs @tab Character @tab @samp{1} if the directory is located on
|
|
an @acronym{NFS}-mounted partition, or @samp{0} otherwise;
|
|
@item mtime-sec @tab Number @tab Modification time, seconds;
|
|
@item mtime-nano @tab Number @tab Modification time, nanoseconds;
|
|
@item dev-no @tab Number @tab Device number;
|
|
@item i-no @tab Number @tab I-node number;
|
|
@item name @tab String @tab Directory name; in contrast to the
|
|
previous versions it is not quoted;
|
|
@item contents @tab Dumpdir @tab Contents of the directory;
|
|
@xref{Dumpdir}, for a description of its format.
|
|
@item
|
|
@end multitable
|
|
|
|
Dumpdirs stored in snapshot files contain only records of types
|
|
@samp{Y}, @samp{N} and @samp{D}.
|
|
|
|
@end enumerate
|
|
|
|
@c End of snapshot.texi
|