Sun Microsystems Logo
Products & Services
 
Support & Training
 
 

Previous Previous     Contents     Index     Next Next

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

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

High-Level View of Backing Up and Restoring File Systems (Task Map)

Use this task map to identify all the tasks for backing up and restoring file systems. Each task points to a series of additional tasks, such as determining the type of backup to perform.

Task

Description

For Instructions

1. Identify the file systems to back up

Identify which file systems need to be backed up on a daily, weekly, or monthly basis.

Planning Which File Systems to Back Up 

2. Determine the type of backup

Determine the type of backup you need for the file systems at your site.

Choosing the Type of Backup 

3. Create the backup

Use one of the following methods:

 

 

If you want to have full and incremental backups of your file systems, use the ufsdump command.

Chapter 47, Backing Up Files and File Systems (Tasks) 

 

If you want to create a snapshot of file system while it is active and mounted, consider using the fssnap command.

Chapter 48, Using UFS Snapshots (Tasks) 

 

If you want to create a snapshot of file system while it is active and mounted, consider using the fssnap command.

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

4. (Optional) Restore a file system

Select the restoration method that is based on the command used to back up the files or file system:

 

 

Restore a file system backup that was created with the ufsdump command.

Chapter 49, Restoring Files and File Systems (Tasks) 

 

Restore a file system that was created with the tar, cpio, or pax command.

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

5. (Optional) Restore the root (/) or /usr file system

Restoring the root (/) or /usr file system is more complicated than restoring a non critical file system. You need to boot from a local CD or from the network while these file systems are being restored.

How to Restore the root (/) and /usr File Systems 

Guidelines for Scheduling Backups

A backup schedule is the schedule that you establish to run the ufsdump command. This section discusses guidelines on the factors to weigh when you create a backup schedule. This section also includes sample backup schedules.

The backup schedule that you create depends on the following:

  • Your need to minimize the number of tapes that are used for backups

  • The time available for doing backups

  • The time available for doing a full restore of a damaged file system

  • The time available for retrieving individual files that are accidentally deleted

How Often Should You Do Backups?

If you do not need to minimize time and the number of media that is used for backups, you can do full backups every day. However, this backup method is not realistic for most sites, so incremental backups are used most often. In this case, you should back up your site enough to so that you can restore files from the last four weeks. This schedule requires at least four sets of tapes, one set for each week. You would then reuse the tapes each month. In addition, you should archive the monthly backups for at least a year. Then, keep yearly backups for a number of years.

Backup Terms and Definitions

The following table describes backup terms and definitions.

Term

Definition

Snapshot

Creates a temporary image of a file system.

Full backup

Copies a complete file system or directory.

Incremental backup

Copies only those files in the specified file system that have changed since a previous backup. Incremental backup types include the following:

  • Daily, cumulative - Copies a day's worth of file changes on Monday. Then, overwrites Monday's backup with file changes from Tuesday, Wednesday, and so on.

  • Daily, incremental - Copies a day's worth of file changes so that you have distinct tapes of Monday's changes, Tuesday's changes, and so on.

  • Weekly cumulative - Copies the files that have changed during the week and includes the previous week's file changes.

  • Weekly incremental - Copies the files that have changed during the week since the previous weekly backup.

Suggestions for Scheduling Backups

The following table provides other suggestions for scheduling backups.

Table 46-6 Suggestions for Backup Schedules

File Restoration Need

Backup Interval

Comments

To restore different versions of files (for example, file systems that are used for word processing)

Do daily incremental backups every working day

Do not reuse the same tape for daily incremental backups

This schedule saves all files modified that day, as well as those files still on disk that were modified since the last backup of a lower level. However, with this schedule, you should use a different tape each day because you might otherwise be unable to restore the needed version of the file.

For example, a file that changed on Tuesday, and again on Thursday, goes onto Friday's lower-level backup appearing as it did Thursday night, not Tuesday night. If a user needs the Tuesday version, you cannot restore it unless you have a Tuesday backup tape (or a Wednesday backup tape). Similarly, a file that is present on Tuesday and Wednesday, but removed on Thursday, does not appear on the Friday lower-level backup.

To quickly restore a complete file system

Do lower-level backups more frequently.

--

To back up a number of file systems on the same server

Consider staggering the schedule for different file systems.

This way you're not doing all level 0 backups on the same day.

To minimize tapes

Increase the level of incremental backups that are done across the week.

Only changes from day to day are saved on each daily tape.

 

Increase the level of backups that are done at the end of the week. Put each day's and week's incremental backups onto the same tape.

Only changes from week to week (rather than the entire month) are saved on the weekly tapes.

 

Put each day's and week's incremental backups onto the same tape.

To do so, use the no rewind option of the ufsdump command, such as specifying /dev/rmt/0n.

Using Dump Levels to Create Incremental Backups

The dump level you specify in the ufsdump command (0-9) determines which files are backed up. Dump level 0 creates a full backup. Levels 1-9 are used to schedule incremental backups, but have no defined meanings. Levels 1-9 are just a range of numbers that are used to schedule cumulative or discrete backups. The only meaning levels 1-9 have is in relationship to each other, as a higher or lower number. A lower dump number always restarts a full or a cumulative backup. The following examples show the flexibility of the incremental dump procedure using levels 1-9.

Example--Dump Levels for Daily, Cumulative Backups

Doing daily, cumulative incremental backups is the most commonly used backup schedule and is recommended for most situations. The following example shows a schedule that uses a level 9 dump Monday through Thursday, and a level 5 dump on Friday to restart the process.

Figure 46-1 Incremental Backup: Daily Cumulative

Illustration shows increasing amount of tape needed for a daily cumulative backup that starts on Monday and finishes on Friday.

In the preceding example, you could have used other numbers in the 1-9 range to produce the same results. The key is using the same number Monday through Thursday, with any lower number on Friday. For example, you could have specified levels 4, 4, 4, 4, 2 or 7, 7, 7, 7, 5.

Example--Dump Levels for Daily, Incremental Backups

The following example shows a schedule where you capture only a day's work on different tapes. This type of backup is referred to as a daily, incremental backup. In this case, sequential dump level numbers are used during the week (3, 4, 5, 6) with a lower number (2) on Friday. The lower number on Friday restarts the processing.

Figure 46-2 Incremental Backup: Daily Incremental

Illustration shows approximately equal amount of tape needed for a daily discrete backup that starts on Monday and finishes on Friday.

In the preceding example, you could have used the sequence 6, 7, 8, 9 followed by 2, or 5, 6, 7, 8 followed by 3. Remember, the numbers themselves have no defined meaning. You attribute meaning by ordering them in a specified sequence, as described in the examples.

Sample Backup Schedules

This section provides sample backup schedules. All schedules assume that you begin with a full backup (dump level 0), and that you use the -u option to record each backup in the /etc/dumpdates file.

Example--Daily Cumulative, Weekly Cumulative Backups

Table 46-7 shows the most commonly used incremental backup schedule. This schedule is recommended for most situations. With this schedule, the following occurs:

  • All files that have changed since the lower-level backup at the end of the previous week are saved each day.

  • For each weekday level 9 backup, the previous level 0 or level 5 backup is the closest backup at a lower level. Therefore, each weekday tape contains all the files that changed since the end of the previous week or the initial level 0 backup for the first week.

  • For each Friday level 5 backup, the closest lower-level backup is the level 0 backup done at the beginning of the month. Therefore, each Friday's tape contains all the files changed during the month up to that point.

Table 46-7 Daily Cumulative or Weekly Cumulative Backup Schedule

 

Floating

Mon

Tues

Wed

Thurs

Fri

1st of Month

0

 

Week 1

 

9

9

9

9

5

Week 2

 

9

9

9

9

5

Week 3

 

9

9

9

9

5

Week 4

 

9

9

9

9

5

The following table shows how the contents of the tapes can change across two weeks with the daily cumulative, weekly cumulative schedule. Each letter represents a different file.

Table 46-8 Contents of Tapes for Daily Cumulative/Weekly Cumulative Backup Schedule

 

Mon

Tues

Wed

Thurs

Fri

Week 1

a b

a b c

a b c d

a b c d e

a b c d e f

Week 2

g

g h

g h i

g h i j

a b c d e f g h i j k

Previous Previous     Contents     Index     Next Next