The preparation for backing up file systems begins with planning, which is described in Chapter 23, Backing Up and Restoring UFS File Systems (Overview) and includes choosing the following:
The file systems to back up
The type of backup (full or incremental) to perform
A backup schedule
A tape drive
For more information, see Chapter 23, Backing Up and Restoring UFS File Systems (Overview).
This section describes two other tasks you might need to perform before you back up file systems:
Finding the names of file systems to back up
Determining the number of tapes that are needed for a full backup
Display the contents of the /etc/vfstab file.
$ more /etc/vfstab |
Look in the mount point column for the name of the file system.
Use the directory name listed in the mount point column when you back up the file system.
In this example, the file systems to be backed up are root (/), /usr, and and /export/home.
# more /etc/vfstab #device device mount FS fsck mount mount #to mount to fsck point type pass at boot options # fd - /dev/fd fd - no - /proc - /proc proc - no - /dev/dsk/c0t0d0s1 - - swap - no - /dev/dsk/c0t0d0s0 /dev/rdsk/c0t0d0s0 / ufs 1 no - /dev/dsk/c0t0d0s6 /dev/rdsk/c0t0d0s6 /usr ufs 1 no - /dev/dsk/c0t0d0s7 /dev/rdsk/c0t0d0s7 /export/home ufs 2 yes - /devices - /devices devfs - no - sharefs - /etc/dfs/sharetab sharefs - no - ctfs - /system/contract ctfs - no - objfs - /system/object objfs - no - swap - /tmp tmpfs - yes - |
Become superuser or assume an equivalent role.
Estimate the size of the backup in bytes.
# ufsdump [0]S file-system |
Use the S option to display the estimated number of bytes that are needed to do the backup if this is the first backup of the file system.
Use the 0S option to display the estimated number of bytes that are needed to do the backup if this is not the first backup of the file system.
Divide the estimated size by the capacity of the tape to determine how many tapes you need.
For a list of tape capacities, see Table 23–5.
In this example, the file system easily fits on a 150-MB tape.
# ufsdump S /export/home 178176 |