[ Previous | Next | Table of Contents | Index | 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 can 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 Command or smit Command. 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 can occur.

backup Command

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

find $HOME -print | backup -i -v

Press Enter.

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, type:

backup -0 -u /

Press Enter.

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, type:

backup -1 -u /

Press Enter.

See the backup command in the AIX 5L Version 5.1 Commands Reference for the exact syntax.

smit Command

The backup command can also be done using smit.

  1. At the prompt, type:

    smit backup
    

    Press Enter.

  2. Type the path name of the directory on which the file system is normally mounted in the DIRECTORY full pathname field:

    /home/bill
    

    Press Enter.

  3. In the BACKUP device or FILE fields, type the output device name as in the following example for a raw magnetic tape device:

    /dev/rmt0
    

    Press Enter.

  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.


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]