Backing up file systems means copying file systems to removable media, such as tape, to safeguard against loss, damage, or corruption. Restoring file systems means copying reasonably current backup files from removable media to a working directory.
This chapter describes the ufsdump and ufsrestore commands for backing up and restoring UFS file systems. Other commands are available for copying files and file systems for the purpose of sharing or transporting files. The following table provides pointers to all commands that copy individual files and file systems to other media.
Table 23–1 Commands for Backing Up and Restoring Files and File Systems
Task |
Command |
For More Information |
---|---|---|
Back up one or more file systems to a local tape device or a remote tape device. |
ufsdump |
Chapter 24, Backing Up UFS Files and File Systems (Tasks) or Chapter 27, UFS Backup and Restore Commands (Reference) |
Create read-only copies of file systems. |
fssnap | |
Back up all file systems for systems on a network from a backup server. |
Solstice Backup software |
Solstice Backup 6.1 Administration Guide |
Back up and restore an NIS+ master server. |
nisbackup and nisrestore |
System Administration Guide: Naming and Directory Services (NIS+) |
Copy, list, and retrieve files on a tape or diskette. |
tar, cpio, or pax | |
Copy the master disk to a clone disk. |
dd | |
Restore complete file systems or individual files from removable media to a working directory. |
ufsrestore |
Backing up files is one of the most crucial system administration functions. You should perform regularly scheduled backups to prevent loss of data due to the following types of problems:
System crashes
Accidental deletion of files
Hardware failures
Natural disasters such as fire, hurricanes, or earthquakes
Problems when you reinstall or upgrade a system
You should back up all file systems that are critical to users, including file systems that change frequently. The following tables provide general guidelines on the file systems to back up for stand-alone systems and servers.
Table 23–2 File Systems to Back Up for Stand-alone Systems
File System to Back Up |
Description |
Back Up Interval |
---|---|---|
root (/) – slice 0 |
This file system contains the kernel and possibly the /var directory. The /var directory contains temporary files, logging files, or status files, and possibly contains frequently updated system accounting and mail files. |
At regular intervals such as weekly or daily |
/usr – slice 6, /opt |
The /usr and /opt file systems contain software and executables. The /opt directory is either part of root (/) or is its own file system. |
Occasionally |
/export/home – slice 7 |
This file system can contain the directories and subdirectories of all users on the stand-alone system. |
More often than root (/) or /usr, perhaps as often as once a day, depending on your site's needs |
/export, /var, or other file systems |
The /export file system can contain the kernel and executables for diskless clients. The /var directory contains temporary files, logging files, or status files. |
As your site requires |
Table 23–3 UFS File Systems to Back Up for Servers
File System to Back Up |
Description |
Back Up Interval |
---|---|---|
root (/) – slice 0 |
This file system contains the kernel and executables. |
Once a day to once a month depending on your site's needs. If you frequently add and remove users and systems on the network, you have to change configuration files in this file system. In this case, you should do a full backup of the root (/) file system at intervals between once a week and once a month. If your site keeps user mail in the /var/mail directory on a mail server, which client systems then mount, you might want to back up root (/) daily. Or, backup the /var directory, if it is a separate file system. |
/export – slice 3 |
This file system can contain the kernel and executables for diskless clients. |
Once a day to once a month, depending on your site's needs. Because the information in this file system is similar to the server's root directory in slice 0, the file system does not change frequently. You need to back up this file system only occasionally, unless your site delivers mail to client systems. Then, you should back up /export more frequently. |
/usr – slice 6, /opt |
The /usr and /opt file systems contain software and executables. The /opt directory is either part of root (/) or is its own file system. |
Once a day to once a month, depending on your site's needs. These file systems are fairly static unless software is added or removed frequently. |
/export/home – slice 7 |
This file system can contains the home directories of all the users on the system. The files in this file system are volatile. |
Once a day to once a week. |
You can perform full or incremental backups by using the ufsdump command. You can create a temporary image of a file system by using the fssnap command. The following table lists the differences between these types of backup procedures.
Table 23–4 Differences Between Types of Backups
The following table shows typical tape devices that are used for storing file systems during the backup process. The storage capacity depends on the type of drive and the data being written to the tape. For more information on tape devices, see Chapter 29, Managing Tape Drives (Tasks).
Table 23–5 Typical Media for Backing Up File Systems
Backup Media |
Storage Capacity |
---|---|
1/2-inch reel tape |
140 MB (6250 bpi) |
2.5-GB 1/4-inch cartridge (QIC) tape |
2.5 GB |
DDS3 4-mm cartridge tape (DAT) |
12–24 GB |
14-GB 8-mm cartridge tape |
14 GB |
DLT 7000 1/2-inch cartridge tape |
35–70 GB |