Previous Table of Contents Next

Accomplishing Incremental Backups

You can specify different backup levels with the ufsdump command, making it possible to back up only those files that were changed since a previous backup at a lower level. Follow these steps to back up incremental changes since the last complete dump:

1.  Bring the system to single-user mode.
2.  Become superuser.
3.  Put a tape into the tape drive.
4.  Type ufsdump [1-9] ucf /dev/rmt / unit /dev/rdsk/c n t n d n s n and press Return. Type the level of the backup at the beginning of the ufsdump arguments. For example, for a level 9 backup, type 9ucf.
5.  Remove the tape from the tape drive and label it.

Restoring a Backed-Up File System (ufsrestore)

The ufsrestore command copies files from backups created using the ufsdump command into the current working directory. You can use ufsrestore to reload an entire file system hierarchy from a level 0 dump and incremental dumps that follow it, or to restore one or more single files from any dump tape. Files are restored with their original owner, last modification time, and mode ( permissions).

Before you start to restore files or file systems, you need to know:

  Which tapes (or diskettes) you need
  The raw device name for the file systems you want to back up
  The type of tape drive you will use
  The device name (local or remote) for the tape drive

Determining Which Tapes to Use

Before you can begin restoring file systems or files, you must determine which backup tapes you need. When restoring an entire file system, you always need the most recent level 0 backup tape. You also need the most recent incremental backup tapes made at each of the higher levels. Refer to the backup plan that you are using to determine the levels and number of tapes you need. For example, if you make level 0 and level 9 backups, you need the most recent level 0 and level 9 backup tapes made.

Use the following steps to determine which tapes to use to restore individual files or file systems:

1.  Ask the user the date when the file or file system was lost, or the approximate date of the files to be recovered.
2.  Refer to your backup plan to find the date of the last backup that would have the file or file system on it. Note that you do not necessarily use the most recently backed up version of the file. To retrieve the most recent version of a file, work backward through the incremental backups from highest to lowest level and most recent to least recent.
3.  If you have on-line archive files created using the ufsdump -a option, type ufsrestore ta archive-name /path / filename(s) and press Return. Be sure to use the complete path for the file-name(s) . A list of the files and the media they are stored on is displayed.
4.  Retrieve the media containing the backups. Be aware of the storage organization of backup media at your site so that you can locate media that are months or years old.
5.  This step is optional. Insert media in the drive and type ufsrestore tf device-name /path/filename(s) and press Return. Be sure to use the complete path for the file-name(s) . If a file is in the backup, its name and inode number are listed. Otherwise, a message says it is not on the volume.
6.  If you have multiple dump files on the same tape, you can use the -s n option to position the tape at the dump you want to use. For example, type ufsrestore xfs /dev/rmt0 5 and press Return to position the tape at the fifth dump and restore it.

Restoring a Full Backup

Follow these steps to restore a full backup of a file system using QIC-150 cartridge tape:

CAUTION! This procedure completely destroys any data already in the file system by creating a new file system on the slice.
1.  Become superuser.
2.  Type init s and press Return. The system is brought to single-user mode, which ensures that no one is using the file system you are restoring.
3.  Type umount mount-point and press Return. The mount point you specify (for example, /files1) is unmounted.
4.  Type newfs /dev/rdsk /c n t n d n s n and press Return. The raw device file for the disk slice (for example, /dev/rdsk /c0t0d0s7 for the /home slice) is wiped clean and the file system is rebuilt.
5.  Type mount /dev/dsk /c n t n d n s n and press Return. The file system, specified as the block file device (for example, /dev/dsk /c0t0d0s7 for /files1), is remounted at the mount point you specify.
6.  Type cd mount-point and press Return. You are in the directory you want to restore.
7.  Insert the tape cartridge in the QIC-150 tape drive.
8.  Type ufsrestore rvf /dev / rmt / 0h and press Return. The file system is restored.

In this example, the /files1 slice c0t0d0s7 is restored:

oak% su
# init s
# umount /files1
# newfs /dev/rdsk/cØtØdØs7
# mount /dev/dsk/cØtØdØs7 /files1
# cd /files1
# ufsrestore rvf /dev/rmt/Øh

Previous Table of Contents Next