[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]
System User's Guide: Operating System and Devices

Backing Up Files (backup Command)

Attention: If you attempt to back up a mounted file system a message is displayed. The backup command continues, but inconsistencies in the file system may occur. This situation does not apply to the root (/) file system.

You can create copies of your files on a backup medium, such as a magnetic tape or diskette, with the backup or smit commands. The copies are in one of the two following backup formats:

Attention: Be sure the flags you specify match the backup medium. Also, if you attempt to back up a mounted file system, inconsistencies may occur.

backup Command

For example, to back up selected files in your $HOME directory by name, enter:

find $HOME -print | backup -i -v

The -i flag prompts the system to read from standard input the names of files to be backed up. The find command generates a list of files in the user's $HOME directory. This list is piped to the backup command as standard input. The -v flag displays a progress report as each file is copied. The files are backed up on the default backup device for the local system.

For example, to back up the root file system, enter:

backup -0 -u /

The 0 level and the / tell the system to back up the / (root) file system. The file system is backed up to the /dev/rfd0 file. The -u flag tells the system to update the current backup level record in the /etc/dumpdates file.

For example, to back up all files in the / (root) file system modified since the last 0 level backup, enter:

backup -1 -u /

See the backup command in the AIX Version 4.3 Commands Reference for the exact syntax.

smit Command

The backup command can also be done using smit.

  1. At the prompt, enter:
    smit backup
  2. Enter the path name of the directory on which the file system is normally mounted in the DIRECTORY full pathname field:
    /home/bill
  3. In the BACKUP device or FILE fields, enter the output device name as in the following example for a raw magnetic tape device:
    /dev/rmt0
  4. Use the Tab key to toggle the optional REPORT each phase of the backup field if you want error messages printed to the screen.
  5. In a system management environment, use the default for the MAX number of blocks to write on backup medium field because this field does not apply to tape backups.
  6. Press Enter to back up the named directory or file system.
  7. Run the restore -t command. If this command generates an error message, you must repeat the entire backup.

[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]