restwparfiles Command

Purpose

Restores files from a workload partition backup source.

Syntax

restwparfiles [ -b blocks ] [ -f device ] [ -a ] [ -m ] [ -n ] [ -d path ] [ -D ] [-V] [ file_list ]

Description

The restwparfiles command restores files from tape, file, CD-ROM, or other workload partition backup source. The restwparfiles command also works for multivolume backups such as multiple CDs, DVDs, USB disks, or tapes.

Flags

Item Description
-a Verifies the physical block size of the tape backup, as specified by the -b blocks flag. You might need to alter the block size to read the backup. The -a flag is valid only when you specify the device in the -f flag as tape.
-b blocks Specifies the number of 512-byte blocks to read in a single input operation, as defined by the blocks parameter. If you do not specify the blocks parameter, the default number of blocks to read is 100.
-d path Specifies the directory path where the files are restored, as defined by the path parameter. If you do not specify the -d flag, the current working directory is used.
Restriction: The directory path where the files are restored must not be root (/) in the global environment, either through the use of -d / or if the current working directory is / and the -d flag is not specified.
-D Produces debug output.
-f device Specifies the device containing the backup (file, tape, CD-ROM, or other source) as defined by the device parameter. When you do not specify the -f flag, the default device is /dev/rmt0.
-m Restores only informational and control files from the image. Use the flag to restore the image.data and wpar.spec files from the backup image. Files are restored under the ./.savewpar_dir/ directory.
-n Specifies that ACLs, PCLs, or extended attributes are not to be restored.
-V Verifies a tape backup.

The -V flag requires the -f device flag and can be used to specify only tape devices. The -V flag causes the restwparfiles command to verify the readability of each file header on the volume group backup and print any errors that occur to the standard error log (stderr) file.

Parameters

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

Examples

  1. To read the backup stored on the /dev/cd1 device and restore all files to the /data/myfiles directory, enter the following command:
    restwparfiles -f /dev/cd1 -d /data/myfiles
  2. To read the backup from the default device at twenty 512-byte blocks at a time and restore the /myapp/app.c file to the current directory, enter the following command:
    restwparfiles -b 20 ./myapp/app.h
  3. To read the backup stored on the /dev/cd1 device and restore the /myapp/app.c file to the /data/testcode directory, enter the following command:
    restwparfiles -f /dev/cd1 -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:
    restwparfiles –f /dev/usbms0 –d /data/myfiles