restorevgfiles Command

Purpose

Restores files from a backup source.

Syntax

restorevgfiles [ -b blocks ] [ -f device ] [ -a ] [ -n ] [ -s ] [ -d path ] [ -D ] [ file_list ]

Description

The restorevgfiles command restores files from tape, file, CD-ROM, or their volume group backup source. The restorevgfiles command also works for multi-volume backups such as multiple CDs, DVDs, USB disks, or tapes.

The restorevgfiles and listvgbackup -r commands perform identical operations and should be considered interchangeable. The restorevgfiles command automatically applies the -r flag. The -r flag, while redundant, is retained for compatibility purposes and will cause no unusual behavior if specified. For a complete description of the -r flag, see the listvgbackup command.

Flags

Item Description
-b blocks Specifies the number of 512-byte blocks to read in a single input operation, as defined by the blocks parameter. If the blocks parameter is not specified, the number of blocks read will default to 100.
-f device Specifies the type of device containing the backup (file, tape, CD-ROM, or other source) as defined by the device parameter. When -f is not specified, device will default to /dev/rmt0.
-a Verifies the physical block size of the tape backup, as specified by the -b block flag. You may need to alter the block size if necessary to read the backup. The -a flag is valid only when a tape backup is used.
-n Does not restore ACLs, PCLs, or extended attributes.
-s Specifies that the backup source is a user volume group and not rootvg.
-d path Specifies the directory path to which the files will be restored, as defined by the path parameter. If the -d parameter is not used, the current working directory is used. This can be a problem if the current working directory is root. We recommend writing to a temporary folder instead of to root.
-D Produces debug output.

Parameters

Item Description
file_list Identifies the list of files to be restored. The full path of the files relative to the current directory should be specified in the space-separated list. All files in the specified directory will be restored unless otherwise directed. If you are restoring all files in a directory, we recommend writing to a temporary folder instead of to root.

Examples

  1. To read the backup stored at /dev/cd1 and restore all files to the /data/myfiles directory, enter:
    restorevgfiles -f /dev/cd1 -s -d /data/myfiles
  2. To read the user vg backup from the default device at 20 512-byte blocks at a time and restore the /myapp/app.h file to the current directory, enter:
    restorevgfiles -b 20 -s ./myapp/app.h
  3. To read the backup stored at /dev/cd1 and restore the /myapp/app.c file to the /data/testcode directory, enter:
    restorevgfiles -f /dev/cd1 -s -d /data/testcode ./myapp/app.c
  4. To read the backup stored at /dev/usbms0 and restore all files to the /data/myfiles directory, enter the following command:
    restorevgfiles –f /dev/usbms0 –s –d /data/myfiles

Files

Item Description
/usr/bin/restorevgfiles Contains the restorevgfiles command