Backing Up and Restoring File Systems (Overview)
This chapter provides guidelines and planning information on the backing up and restoring of file systems by using the ufsdump and ufsrestore commands.
This is a list of the overview information in this chapter.
What's New in Backing Up and Restoring File Systems?
This section describes new backup and restore features in the Solaris 9 release.
UFS Snapshots
The Solaris 9 release includes the fssnap command for the backing up of file systems while the file system is mounted.
You can use the fssnap command to create a read-only snapshot of a file system. A snapshot is a file system's temporary image that is intended for backup operations.
For more information, see Chapter 47, Using UFS Snapshots (Tasks).
Where to Find Backup and Restore Tasks
Backup or Restore Task | For More Information |
---|---|
Back up file systems with the ufsdump command | |
Create UFS snapshots with the fssnap command | |
Restore file systems with the ufsrestore command | |
Copy files and directories with the cpio, dd, pax, and cpio commands |
Definition: Backing Up and Restoring File Systems
Backing up file systems means the copying of file systems to removable media (such as tape) to safeguard against loss, damage, or corruption. Restoring file systems means the copying of 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 media.
Table 45-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 46, Backing Up Files and File Systems (Tasks) or Chapter 49, 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 5.1 Administration Guide |
Back up and restore an NIS+ master server | nisbackup and nisrestore | System Administration Guide: Naming and Directory Services (FNS and NIS+) |
Copy, list, and retrieve files on tape or diskette | tar, cpio, or pax | |
Copy master disk to a clone disk | dd | |
Restore complete file systems or individual files from removable media to a working directory | ufsrestore |
Why You Should Back Up File Systems
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:
System crashes
Accidental deletion of files
Hardware failures
Natural disasters (for example, fire, hurricanes, earthquakes)
Problems when you reinstall or upgrade a system
Planning Which File Systems to Back Up
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 standalone systems and servers.
Table 45-2 File Systems to Back Up for Standalone Systems
File System to Back Up | Description | Back Up Interval |
---|---|---|
root (/) - slice 0 | This file system contains the kernel and might contain the /var directory in which frequently modified files such as mail and accounting are kept. | At regular intervals such as weekly or daily |
/usr - slice 6, /opt | The installation of new software and adding new commands typically affects the /usr and /opt file systems. /opt is either part of root (/) or is its own file system. | Occasionally. |
/export/home - slice 7 | This file system contains the directories and subdirectories of all users on the standalone 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 | During installation of Solaris software, you might have created these file systems. | As your site requires. |
Table 45-3 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 interverals 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 /var, 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 contains is similar to the server's root directory in slice 0, it 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 |
| Once a day to once a month depending on your site's needs. These file systems are fairly static and need to be backed up once a week to once a month. |
/export/home - slice 7 | This file system 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. |
Choosing the Type of Backup
You can perform full or incremental backups with the ufsdump command. You can create a temporary image of a file system with the fssnap command. The following table lists the differences between these types of backup procedures.
Table 45-4 Differences Between Types of Backups