# xfsinvutil - xfsdump inventory database checking and pruning utility - man(8) - [phpMan]

[_xfsinvutil_(8)](https://www.chedong.com/phpMan.php/man/xfsinvutil/8/markdown)                          System Manager's Manual                         [_xfsinvutil_(8)](https://www.chedong.com/phpMan.php/man/xfsinvutil/8/markdown)

## NAME
       xfsinvutil - xfsdump inventory database checking and pruning utility

## SYNOPSIS
       **xfsinvutil **[-F|-i] [-m _media_label_] -M _mount_point_ _mm/dd/yyyy_
       **xfsinvutil **[-F|-i] [-m _media_label_] -u _UUID_ _mm/dd/yyyy_
       **xfsinvutil **[-F] -s _SESSION_ID_
       **xfsinvutil **-i
       **xfsinvutil **-C

## DESCRIPTION
       _xfsdump_  maintains  an online dump inventory in _/var/lib/xfsdump/inventory_.  The **-I **option of
       xfsdump displays the inventory contents hierarchically.  The levels  of  the  hierarchy  are:
       filesystem, dump session, stream, and media file.

       _xfsinvutil_  is  a 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  in‐
       ventory.

       The following command line options are available:

### -F   
            _til_  will normally ask the operator for permission to delete the entry. With this option
            the deletion is performed, no questions asked.

### -i   
            browse  and  modify  the contents of the inventory. Please refer to the **Interactive Mode**
            section below for more information.

### -M _
            Prunes dump sessions identified by the given mount point which were created prior to the
            specified date. Optionally **-m **may be be specified to further  limit  the  matching  dump
            sessions  by  media  label.  _xfsinvutil_ will prompt the operator prior to pruning a dump
            session unless the **-F **or **-i **options are given.

### -u _
            Like **-M**, except the matching filesystem is specified using its universally unique  iden‐
            tifier (UUID) instead of its mount point.

### -m _
            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 **-M **or **-u **options.  This option allows the pruning of all inventory refer‐
            ences to media which may have been overwritten or lost. Note that this option  does  not
            apply to sessions with no media files.

### -s _
            Prunes  the dump session identified by the given session id.  _xfsinvutil_ will prompt the
            operator prior to pruning a dump session unless the **-F **option is given.

### -C   
            tory  database.   It  fixes any problems found. If no consistent entries are found , the
            corresponding inventory database file is removed.

### Interactive Mode
       When run with **-i**, _xfsinvutil_ 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:

       **+    **Expand a branch of the tree.

       **-    **Collapse a branch of the tree.

       ***    **Fully expand a branch of the tree.

       **%    **Fully collapse a branch of the tree.

       **h    **Move selection to the parent entry.

       **l    **Move selection to the child entry.

       **j    **Move selection to next entry.

       **k    **Move selection to previous entry.

       **d    **Mark the current record, and all sub-records, to be deleted.

       **u    **Clear the current record and all parent records from being deleted.

       **i    **Import another _xfsdump_ inventory.

       **?    **Show help window.

       **x    **Commit any changes made to the inventory, and exit the program.

       **q    **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 rec‐
       ommended 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 im‐
       ported.  _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 en‐
       tries 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.

## NOTES
### Inventory
       Each dump session updates an inventory database in _/var/lib/xfsdump/inventory_.  _xfsdump_  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.

## FILES
       /var/lib/xfsdump/inventory
                                dump inventory database

## SEE ALSO
       [xfsdump(8)](https://www.chedong.com/phpMan.php/man/xfsdump/8/markdown), [xfsrestore(8)](https://www.chedong.com/phpMan.php/man/xfsrestore/8/markdown).

                                                                                       [_xfsinvutil_(8)](https://www.chedong.com/phpMan.php/man/xfsinvutil/8/markdown)
