xfsdump(1M) xfsdump(1M) NAME xfsdump - XFS filesystem incremental dump utility SYNOPSIS xfsdump [ -f destination ... ] [ -l level ] [ -p report_interval ] [ -s pathname ... ] [ -v verbosity ] [ -A ] [ -B base_id ] [ -C ] [ -E ] [ -F ] [ -I [ subopt=value ... ] ] [ -J ] [ -L session_label ] [ -M media_label ... ] [ -O options_file ] [ -R ] [ -T ] [ -Y io_ring_length ] [ - ] filesystem DESCRIPTION xfsdump backs up files and their attributes in a filesystem. The files are dumped to storage media, a regular file, or standard output. Options allow the operator to have all files dumped, just files that have changed since a previous dump, or just files contained in a list of pathnames. The xfsrestore(1M) utility re-populates a filesystem with the contents of the dump. Each invocation of xfsdump dumps just one filesystem. That invocation is termed a dump session. The dump session splits the filesystem into one or more dump streams, one per destination. The split is done in filesystem inode number (ino) order, at boundaries selected to equalize the size of each stream. Furthermore, the breakpoints between streams may be in the middle of very large files (at extent boundaries) if necessary to achieve reasonable stream size equalization. Each dump stream can span several media objects, and a single media object can contain several dump streams. The typical media object is a tape cartridge. The media object records the dump stream as one or more media files. A media file is a self-contained partial dump. The portion of a dump stream contained on a media object can be split into several media files. This minimizes the impact of media dropouts on the entire dump stream, and speeds subtree restores. xfsdump maintains an online dump inventory in /var/xfsdump/inventory. The -I option displays the inventory contents hierarchically. The levels of the hierarchy are: filesystem, dump session, stream, and media file. -f destination Specifies a dump destination. A dump destination can be the pathname of a device (such as a tape drive), a regular file, or a remote tape drive (see rmt(1M)). Up to 20 dump destinations can be specified, in which case each destination receives an equal portion of the filesystem. This option must be omitted if the standard output option (a lone - preceding the source filesystem specification) is specified. -l level Specifies a dump level of 0 to 9. The dump level determines the base dump to which this dump is relative. The base dump is the most recent dump at a lesser level. A level 0 dump is absolute - all files are dumped. A dump level where 1 <= level <= 9 is referred to Page 1 xfsdump(1M) xfsdump(1M) as an incremental dump. Only files that have been changed since the base dump are dumped. Subtree dumps (see the -s option below) cannot be used as the base for incremental dumps. -p interval Causes progress reports to be printed at the specified interval. interval is given in seconds. The progress report indicates how many files have been dumped, the total number of files to dump, the percentage of data dumped, and the elapsed time. -s pathname ... Restricts the dump to files contained in the specified pathnames (subtrees). Up to 100 pathnames can be specified. A pathname must be relative to the mount point of the filesystem. For example, if a filesystem is mounted at /d2, the pathname argument for the directory /d2/users is ``users''. A pathname can be a file or a directory; if it is a directory, the entire hierarchy of files and subdirectories rooted at that directory is dumped. Subtree dumps cannot be used as the base for incremental dumps (see the -l option above). -v verbosity_level Specifies the level of detail of the messages displayed during the course of the dump. The argument can be silent, verbose, or trace. The default is verbose. -A Do not dump extended file attributes. Unless this option is specified, extended file attributes are dumped. Note that dumps containing extended file attributes cannot be restored with older versions of xfsrestore(1M). -B base_id Specifies the ID of the dump session upon which this dump session is to be based. If this option is specified, the -l (level) and -R (resume) options are not allowed. Instead, xfsdump determines if the current dump session should be incremental and/or resumed, by looking at the base session's level and interrupted attributes. If the base session was interrupted, the current dump session is a resumption of that base at the same level. Otherwise, the current dump session is an incremental dump with a level one greater than that of the base session. This option allows incremental and resumed dumps to be based on any previous dump, rather than just the most recent. -E Pre-erase media. If this option is specified, media is erased prior to use. The operator is prompted for confirmation, unless the -F option is also specified. -F Don't prompt the operator. When xfsdump encounters a media object containing non-xfsdump data, xfsdump normally asks the operator for permission to overwrite. With this option the overwrite is performed, no questions asked. When xfsdump encounters end-of-media Page 2 xfsdump(1M) xfsdump(1M) during a dump, xfsdump normally asks the operator if another media object will be provided. With this option the dump is instead interrupted. -I Displays the xfsdump inventory (no dump is performed). xfsdump records each dump session in an online inventory in /var/xfsdump/inventory. xfsdump uses this inventory to determine the base for incremental dumps. It is also useful for manually identifying a dump session to be restored. Suboptions to filter the inventory display are described later. -J Inhibits the normal update of the inventory. This is useful when the media being dumped to will be discarded or overwritten. -L session_label Specifies a label for the dump session. It can be any arbitrary string up to 255 characters long. -M media_label Specifies a label for the first media object (for example, tape cartridge) written on the corresponding destination during the session. It can be any arbitrary string up to 255 characters long. Multiple media object labels can be specified, one for each destination. -O options_file Insert the options contained in options_file into the beginning of the command line. The options are specified just as they would appear if typed into the command line. In addition, newline characters (\n) can be used as whitespace. The options are placed before all options actually given on the command line, just after the command name. Only one -O option can be used. Recursive use is ignored. The source filesystem cannot be specified in options_file. -R Resumes a previously interrupted dump session. If the most recent dump at this dump's level (-l option) was interrupted, this dump contains only files not in the interrupted dump and consistent with the incremental level. However, files contained in the interrupted dump that have been subsequently modified are re-dumped. -T Inhibits interactive dialogue timeouts. When the -F option is not specified, xfsdump prompts the operator for labels and media changes. Each dialogue normally times out if no response is supplied. This option prevents the timeout. -Y io_ring_length Specify I/O buffer ring length. xfsdump uses a ring of output buffers to achieve maximum throughput when dumping to tape drives. The default ring length is 3. Page 3 xfsdump(1M) xfsdump(1M) - A lone - causes the dump stream to be sent to the standard output, where it can be piped to another utility such as xfsrestore(1M) or redirected to a file. This option cannot be used with the -f option. The - must follow all other options and precede the filesystem specification. The filesystem, filesystem, can be specified either as a mount point or as a special device file (for example, /dev/dsk/dks0d1s0). The filesystem must be mounted to be dumped. NOTES Dump Interruption A dump can be interrupted at any time and later resumed. To interrupt, type control-C (or the current terminal interrupt character). The operator is prompted to select one of several operations, including dump interruption. After the operator selects dump interruption, the dump continues until a convenient break point is encountered (typically the end of the current file). Very large files are broken into smaller subfiles, so the wait for the end of the current file is brief. Dump Resumption A previously interrupted dump can be resumed by specifying the -R option. If the most recent dump at the specified level was interrupted, the new dump does not include files already dumped, unless they have changed since the interrupted dump. Media Management A single media object can contain many dump streams. Conversely, a single dump stream can span multiple media objects. If a dump stream is sent to a media object already containing one or more dumps, xfsdump appends the new dump stream after the last dump stream. Media files are never overwritten. If end-of-media is encountered during the course of a dump, the operator is prompted to insert a new media object into the drive. The dump stream continuation is appended after the last media file on the new media object. Inventory Each dump session updates an inventory database in /var/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. Several suboptions are available to filter the display. Specifying -I depth=n (where n is 1, 2, or 3) limits the hierarchical depth of the display. Specifying -I mobjid=value (where value is a media ID) or -I mobjlabel=value (where value is a media label) limits the display to Page 4 xfsdump(1M) xfsdump(1M) media files contained in the specified media object. Similarly, the display can be restricted to a specific filesystem identified by mount point using -I mnt=host-qualified_mount_point_pathname, by filesystem ID using -I fsid=filesystem_id, or by device using -I dev=host- qualified_device_pathname. At most three suboptions can be specified at once: one to constrain the depth, one to constrain the media object, and one to constrain the filesystem. For example, -I depth=1,mobjlabel="tape 1",mnt=host1:/test_mnt would display only the filesystem information (depth=1) for those filesystems that were mounted on host1:/test_mnt at the time of the dump, and only those filesystems dumped to the media object labeled "tape 1". There is currently no way to remove dumps from the inventory. An additional media file is placed at the end of each dump stream. This media file contains the inventory information for the current dump session. This is currently unused. When operating in the miniroot environment, xfsdump does not create and does not reference the inventory database. Thus incremental and resumed dumps are not allowed. Labels The operator can specify a label to identify the dump session and a label to identify a media object. The session label is placed in every media file produced in the course of the dump, and is recorded in the inventory. The media label is used to identify media objects, and is independent of the session label. Each media file on the media object contains a copy of the media label. An error is returned if the operator specifies a media label that does not match the media label on a media object containing valid media files. Media labels are recorded in the inventory. UUIDs UUIDs (Universally Unique Identifiers) are used in three places: to identify the filesystem being dumped (using the filesystem UUID, see xfs(4) for more details), to identify the dump session, and to identify each media object. The inventory display (-I) includes all of these. Dump Level Usage The dump level mechanism provides a structured form of incremental dumps. A dump of level level includes only files that have changed since the most recent dump at a level less than level. For example, the operator can establish a dump schedule that involves a full dump every Friday and a daily incremental dump containing only files that have changed since the previous dump. In this case Friday's dump would be at level 0, Saturday's at level 1, Sunday's at level 2, and so on, up to the Thursday dump at level 6. Page 5 xfsdump(1M) xfsdump(1M) The above schedule results in a very tedious restore procedure to fully reconstruct the Thursday version of the filesystem; xfsrestore would need to be fed all 7 dumps in sequence. A compromise schedule is to use level 1 on Saturday, Monday, and Wednesday, and level 2 on Sunday, Tuesday, and Thursday. The Monday and Wednesday dumps would take longer, but the worst case restore requires the accumulation of just three dumps, one each at level 0, level 1, and level 2. Miniroot Restrictions xfsdump is subject to the following restrictions when operated in the miniroot environment: non-restartable, no incrementals, no online inventory, synchronous I/O. FILES /var/xfsdump/inventory dump inventory database SEE ALSO rmt(1M), xfsrestore(1M), attr_get(2). DIAGNOSTICS The exit code is 0 on normal completion, non-zero if an error occurs or the dump is terminated by the operator. BUGS xfsdump does not dump unmounted filesystems. The dump frequency field of /etc/fstab is not supported. xfsdump does not have the capability to send mail when operator intervention is required. No means is provided to remove media objects from the inventory. xfsdump requires root privilege (except for inventory display). xfsdump can only dump XFS filesystems. The media format used by xfsdump can only be understood by xfsrestore. xfsdump does not know how to manage CD-ROM or other removable disk drives. xfsdump can become confused when doing incremental or resumed dumps if on the same machine you dump two XFS filesystems and both filesystems have the same filesystem identifier (UUID). Since xfsdump uses the filesystem identifier to identify filesystems, xfsdump maintains one combined set of dump inventories for both filesytems instead of two sets of dump inventories. This scenario can happen only if dd or some other block- by-block copy program was used to make a copy of an XFS filesystem. See xfs_copy(1M) and xfs(4) for more details. Page 6