xfsdump xfsrestore for LTO4 Tape

Backup / of XFS format into LTO4 tape (/dev/nst0) in CentOS 7.1 with xfsdump:

    -o: Overwrite the tape. With this option, xfsdump does not read the tape first to check the contents.This option may be used if xfsdump is unable to determine the block size of a tape .
    -E: Pre-erase media.
    -J: Inhibits the normal update of the inventory. This is useful when the media being dumped to will be discarded or overwritten.
    -F: Don’t prompt the operator
    -J: Inhibits the normal update of the inventory.
# mt -f /dev/nst0 rewind
# /usr/sbin/xfsdump -J -L session_20160428 -M media0  -l 0 -v verbose -F -o -E -f /dev/nst0 /
/usr/sbin/xfsdump: using scsi tape (drive_scsitape) strategy
/usr/sbin/xfsdump: version 3.1.4 (dump format 3.0)
/usr/sbin/xfsdump: WARNING: most recent level 0 dump was interrupted, but not resuming that dump since resume (-R) option not specified
/usr/sbin/xfsdump: level 0 dump of seis09.se.cuhk.edu.hk:/
/usr/sbin/xfsdump: dump date: Tue May  3 17:05:00 2016
/usr/sbin/xfsdump: session id: 62ec2ca1-68d6-4dec-92a5-8d0a74495efb
/usr/sbin/xfsdump: session label: "session_20160428"
/usr/sbin/xfsdump: ino map phase 1: constructing initial dump list
/usr/sbin/xfsdump: ino map phase 2: skipping (no pruning necessary)
/usr/sbin/xfsdump: ino map phase 3: skipping (only one dump stream)
/usr/sbin/xfsdump: ino map construction complete
/usr/sbin/xfsdump: estimated dump size: 329217099904 bytes
/usr/sbin/xfsdump: preparing drive
/usr/sbin/xfsdump: WARNING: media may contain data. Overwrite option specified
/usr/sbin/xfsdump: creating dump session media file 0 (media 0, file 0)
/usr/sbin/xfsdump: dumping ino map
/usr/sbin/xfsdump: dumping directories
/usr/sbin/xfsdump: dumping non-directory files
/usr/sbin/xfsdump: ending media file
/usr/sbin/xfsdump: media file size 275263782912 bytes
/usr/sbin/xfsdump: writing stream terminator
/usr/sbin/xfsdump: beginning media stream terminator
/usr/sbin/xfsdump: media file 1 (media 0, file 1)
/usr/sbin/xfsdump: ending media stream terminator
/usr/sbin/xfsdump: media stream terminator size 1048576 bytes
/usr/sbin/xfsdump: dump size (non-dir files) : 259775351200 bytes
/usr/sbin/xfsdump: dump complete: 8561 seconds elapsed
/usr/sbin/xfsdump: Dump Summary:
/usr/sbin/xfsdump:   stream 0 /dev/nst0 OK (success)
/usr/sbin/xfsdump: Dump Status: SUCCESS

Restore files to /tmp/restore directory from LTO4 tape (/dev/nst0) in CentOS 7.1 with xfsrestore:

    -b: -b blocksize specifies the blocksize, in bytes, to be used for the restore.
# mt -f /dev/nst0 rewind 
# cd /tmp
# mkdir -p /tmp/restore
# xfsrestore -i -b 512 -v verbose   -f /dev/nst0  restore

You may also like...