To back up a file system by i-node, specify the -Level and FileSystem parameters. When used in conjunction with the -u flag, the -Level parameter provides a method of maintaining a hierarchy of incremental backups for each file system. Specify the -u flag and set the -Level parameter to n to back up only those files that have been modified since the n-1 level backup. The possible backup levels are 0 to 9. A level 0 backup archives all files in the file system.
The FileSystem parameter can specify either the physical device name (block or raw name) or the name of the directory on which the file system is mounted. The default file system is the root (/) file system.
Users must have read access to the file system device (such as /dev/hd4) or have backup authorization to perform backups by i_node.
Backs up files and file systems.
To back up files by name:
backup -i [ -b Number ] [ -p [ -e RegularExpression ] ] [ -E{force|ignore|warn} ] [ -f Device ] [ -l Number ] [ -U ] [ -o ] [ -q ] [ -v ]
To back up file systems by i-node:
backup [ [ -Level ] [ -b Number ] [ -c ] [ -f Device ] [ -L Length ] [ -U ] [ -u ] ] [ FileSystem ] | [ -w | -W ]
-9uf/dev/rfd0 /dev/rhd4
The default backup device is /dev/rfd0. If flags are specified that are not appropriate for the specified backup device, the backup command displays an error message and continues with the backup.
A single backup can span multiple volumes.
In other words, the -b flag should not be specified when the tape device block size is 0. If the -b flag of the backup command is specified and is different from the default size, the same size must be specified with the -b flag of the restore command when the archived files are restored from the tape.
Backing up files by name
To back up by name, use the -i flag. The backup command reads standard input for the names of the files to be backed up.
File types can be special files, regular files, or directories. When the file type is a directory, only the directory is backed up. The files under the directory are not backed up, unless they are explicitly specified.
When you enter the file names from the keyboard and the backup process needs a new tape or diskette, the command loses any file names already entered but not yet backed up. To avoid this problem, enter each file name only after the archived message for the previous file has been displayed. The archived message consists of the character a followed by the file name.
Backing up file systems by i-node
This command returns the following exit values:
0 | Successful completion. |
>0 | An error occurred. |
find /home -print | backup -i -f /dev/rmt0
The -i flag specifies that files will be read from standard input and archived by the file name. The find command generates a list of all the files in the /home directory. The files in this list are full path names. The | (pipe symbol) causes this list to be read from standard input by the backup command. The -f flag directs the backup command to write the files to the /dev/rmt0 tape device. Because the files are archived using full path names, they will be written to the same paths when restored.
find . -print | backup -i -v -q
Each file name in the list generated by the find command is preceded by ./ (dot, slash). Because the files are backed up using relative path names, they are written to the current directory when restored. The -v flag causes the backup command to display additional information about the backup. The files are written to the default backup device /dev/rfd0.
backup -0 -u -f /dev/rmt0 /
The 0 level specifies that all the files in the / (root) file system be backed up. The -u flag causes the backup command to update the /etc/dumpdates file for this backup.
backup -1 -u -f /dev/rmt0 /
If the /etc/dumpdates file does not have an entry for a level 0 backup of the / (root) system, all the files in the file system are backed up.
/var/vio/VMLibrary/media_file1 /var/vio/VMLibrary/media_file2 /var/vio/VMLibrary/media_filen
cat backup_files | backup -i -f /dev/rmt0