System Administration Guide: Devices and File Systems
Previous Next

Introduction to Backing Up and Restoring File Systems

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 24-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 25, Backing Up Files and File Systems (Tasks) or Chapter 28, UFS Backup and Restore Commands (Reference)

Create read-only copies of file systems.

fssnap

Chapter 26, Using UFS Snapshots (Tasks)

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

Chapter 29, Copying UFS Files and File Systems (Tasks)

Copy the master disk to a clone disk.

dd

Chapter 29, Copying UFS Files and File Systems (Tasks)

Restore complete file systems or individual files from removable media to a working directory.

ufsrestore

Chapter 27, Restoring Files and File Systems (Tasks)

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 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

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 stand-alone systems and servers.

Table 24-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 24-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 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.

Choosing the Type of Backup

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 24-4 Differences Between Types of Backups

Backup Type

Result

Advantages

Disadvantages

Full

Copies a complete file system or directory

All data is in one place

Requires large numbers of backup tapes that take a long time to write. Takes longer to retrieve individual files because the drive has to move sequentially to the point on the tape where the file is located. You might have to search multiple tapes.

Snapshot

Creates a temporary image of a file system

System can be in multiuser mode

System performance might degrade while the snapshot is created.

Incremental

Copies only those files in the specified file system that have changed since a previous backup

Easier to retrieve small changes in file systems

Finding which incremental tape contains a file can take time. You might have to go back to the last full backup.

Choosing a Tape Device

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 30, Managing Tape Drives (Tasks).

Table 24-5 Typical Media for Backing Up File Systems

Backup Media

Storage Capacity

1/2-inch reel tape

140 Mbytes (6250 bpi)

2.5-Gbyte 1/4-inch cartridge (QIC) tape

2.5 Gbytes

DDS3 4-mm cartridge tape (DAT)

12–24 Gbytes

14-Gbyte 8-mm cartridge tape

14 Gbytes

DLT 7000 1/2-inch cartridge tape

35–70 Gbytes

Previous Next