xfsdump maintains an online dump inventory in <2>/var/lib/xfsdump/inventory2><1>.
The
-I 1>option of xfsdump displays the inventory contents hierarchically.
The levels of the hierarchy are:
filesystem,
dump session,
stream, and
media file.
Over time, this database may grow too large as
xfsdump(8) and
xfsrestore(8) do not remove entries from the inventory. The database may also develop
inconsistencies for various reasons such as operator errors etc.,
that may cause
xfsdump or
xfsrestore to print error or warning messages.
xfsinvutil is an utility to check this inventory database for consistency,
to remove entries of dump sessions which may no longer be of
relevance, and to browse the contents of the inventory.
xfsinvutil may be used in three different modes. In the first mode
xfsinvutil steps over each dump session recorded in the inventory and prompts for
a yes or no response to whether each session should be pruned. The
second is a batch mode in which
xfsinvutil will prune every entry matching the supplied criteria. The third mode
allows the user to browse the inventory in detail, to delete or
undelete records at will and also to import inventories from other
hosts.
The following command line options are available:
<3>-F3><1>
Don't prompt the operator. When
xfsinvutil encounters a matching dump session,
xfsinvutil will normally ask the operator for permission to delete the
entry. With this option the deletion is performed, no questions asked.
1>
<3>-i3><1>
Interactive mode. Causes
xfsinvutil to run in a mode that will allow the operator to browse the contents of
the inventory. Please refer to the
Interactive Mode section below for more information.
1>
<3>-M3><1> 1><2>mount_point mm/dd/yyyy2><1>
Specifies the mount point and cut-off date of inventory entries to
be selected for pruning.
xfsinvutil prompts the operator when a dump session in the inventory is
identified by the mount point and was created prior to the specified
date.
The operator can then select specific dump sessions for removal from
the inventory database.
This prompt will not happen if the <3>-n3><1> option is used; it will
be assumed that the pruning is wanted.
xfsinvutil 1>also performs consistency checks on other inventory database entries when
invoked with this option.
1>
The <2>mountpoint2><1> must match the mount point as specified in
the inventory shown using
xfsdump 1>with the <3>-I3><1> option.
This includes the host name and the mount path.
1>
<3>-u3><1> 1><2>UUID2><1>
Specifies the filesystem universally unique identifier (UUID) of
inventory entries to be selected for pruning. This option is
equivalent to the <3>-M3><1> option.
1>
1>
<3>-m3><1> 1><2>media_label2><1>
If specified, only sessions with at least one media file whose label
matches this value will be eligible for pruning. This restriction is
in addition to those imposed by the date and the <3>-M3><1> or
1><3>-u3><1> options. This option allows the pruning of all inventory
references to media which may have been overwritten or lost.
1>
1>
-n
With this option,
xfsinvutil will not ask any confirmation questions regarding sessions to prune.
(It is the "Nike" option).
-C
With this option,
xfsinvutil performs consistency checks for all entries in the inventory database.
It fixes any problems found. If no consistent entries are found , the
corresponding inventory database file is removed.
Interactive Mode When run with <3>-i3><1>,
xfsinvutil 1>will present the operator with a hierarchical representation of the
xfsdump inventory. In this mode, the operator can use the arrow keys (or
the
h j k l keys)
to navigate the inventory and also use the following keys and
functionality:
<3>+3><1>
Expand a branch of the tree.
1>
<3>-3><1>
Collapse a branch of the tree.
1>
<3>*3><1>
Fully expand a branch of the tree.
1>
<3>%3><1>
Fully collapse a branch of the tree.
1>
<3>h3><1>
Move selection to the parent entry.
1>
<3>l3><1>
Move selection to the child entry.
1>
<3>j3><1>
Move selection to next entry.
1>
<3>k3><1>
Move selection to previous entry.
1>
<3>d3><1>
Mark the current record, and all sub-records, to be deleted.
1>
<3>u3><1>
Clear the current record and all parent records from being deleted.
1>
<3>i3><1>
Import another
xfsdump inventory.
1>
<3>?3><1>
Show help window.
1>
<3>x3><1>
Commit any changes made to the inventory, and exit the program.
1>
<3>q3><1>
Exit the program without committing any changes to the inventory.
Inventories from other hosts can be imported to create a larger common
inventory. It is recommended that the contents of
/var/lib/xfsdump/inventory on the remote host be copied to a temporary local directory prior to
running
xfsinvutil . When
xfsinvutil is run in interactive mode, and the operator hits
i , they will be prompted for the path to the inventory to be imported.
xfsinvutil will then add the contents of the imported inventory to the main
window, and all entries will be marked as imported. The operator can
then delete any of these entries that are not to be imported. When the
operator commits the changes,
xfsinvutil will import any entries which were not marked as deleted. Deleted entries are
not actually deleted from the original imported inventory.
1>
NOTES
Inventory Each dump session updates an inventory database in <2>/var/lib/xfsdump/inventory2><1>.
xfsdump 1>uses the inventory to determine the base of incremental
and resumed dumps.
This database can be displayed by invoking
xfsdump with the
-I option.
The display uses tabbed indentation to present the inventory
hierarchically.
The first level is filesystem.
The second level is session.
The third level is media stream (currently only one stream is supported).
The fourth level lists the media files sequentially composing the stream.