JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
System Administration Guide: Devices and File Systems     Oracle Solaris 10 1/13 Information Library
search filter icon
search icon

Document Information

Preface

1.  Managing Removable Media (Overview/Tasks)

2.  Writing CDs and DVDs (Tasks)

3.  Managing Devices (Tasks)

4.  Dynamically Configuring Devices (Tasks)

5.  Managing USB Devices (Tasks)

6.  Using InfiniBand Devices (Overview/Tasks)

7.  Managing Disks (Overview)

8.  Managing Disk Use (Tasks)

9.  Administering Disks (Tasks)

10.  SPARC: Setting Up Disks (Tasks)

11.  x86: Setting Up Disks (Tasks)

12.  Configuring Oracle Solaris iSCSI Targets (Tasks)

13.  The format Utility (Reference)

14.  Managing File Systems (Overview)

15.  Creating and Mounting File Systems (Tasks)

16.  Configuring Additional Swap Space (Tasks)

17.  Checking UFS File System Consistency (Tasks)

18.  UFS File System (Reference)

19.  Backing Up and Restoring UFS File Systems (Overview/Tasks)

Introduction to Backing Up and Restoring UFS File Systems

Why You Should Back Up File Systems

Planning Which UFS File Systems to Back Up

Choosing the Type of Backup

Choosing a Tape Device

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

Considerations for Scheduling Backups

How Often Should You Do Backups?

Backup Interval Terms and Definitions

Guidelines for Scheduling Backups

Using Dump Levels to Create Incremental Backups

Example--Dump Levels for Daily, Cumulative Backups

Example--Dump Levels for Daily, Incremental Backups

Sample Backup Schedules

Example--Daily Cumulative, Weekly Cumulative Backup Schedule

Tape Requirements for the Daily Cumulative, Weekly Cumulative Schedule

Example--Daily Cumulative, Weekly Incremental Backup Schedule

Tape Requirements for the Daily Cumulative, Weekly Incremental Backup Schedule

Example--Daily Incremental, Weekly Cumulative Backup Schedule

Tape Requirements for Daily Incremental, Weekly Cumulative Schedule

Example--Monthly Backup Schedule for a Server

Backing Up UFS Files and File System (Task Map)

Preparing for File System Backups

How to Find UFS File System Names

How to Determine the Number of Tapes Needed for a Full Backup

Backing Up a UFS File System

How to Back Up a UFS File System to Tape

Restoring UFS Files and File System Backups (Task Map)

Preparing to Restore UFS Files and File Systems

Determining the UFS File System Name

Determining the Type of Tape Device You Need

Determining the Tape Device Name

Restoring UFS Files and File Systems

How to Determine Which Tapes to Use

How to Restore UFS Files Interactively

How to Restore Specific UFS Files Noninteractively

How to Restore a Complete UFS File System

How to Restore a UFS root (/) and /usr File System

20.  Using UFS Snapshots (Tasks)

21.  Copying Files and File Systems (Tasks)

22.  Managing Tape Drives (Tasks)

23.  UFS Backup and Restore Commands (Reference)

Index

Backing Up a UFS File System

The following are general guidelines for performing backups:

How to Back Up a UFS File System to Tape

The following are general steps for backing up file systems by using the ufsdump command. The examples show specific uses of options and arguments.

  1. Become superuser or assume an equivalent role.
  2. Bring the system to run level S (single-user mode).

    For example:

    # shutdown -g30 -y
  3. (Optional) Check the file system for consistency.

    For example:

    # fsck -m /dev/rdsk/c0t0d0s7

    The fsck -m command checks for the consistency of file systems. For example, power failures can leave files in an inconsistent state. For more information on the fsck command, see Chapter 17, Checking UFS File System Consistency (Tasks).

  4. If you need to back up file systems to a remote tape drive, follow these steps:
    1. On the system to which the tape drive is attached (the tape server), add the following entry to its /.rhosts file:
      host root

      The host entry specifies the name of the system on which you will run the ufsdump command to perform the backup.

    2. On the tape server, verify that the host added to the /.rhosts file is accessible through the name service.
  5. Identify the device name of the tape drive.

    The default tape drive is the /dev/rmt/0 device.

  6. Insert a tape that is write-enabled into the tape drive.
  7. Back up file systems.
    # ufsdump options arguments filenames

    You can back up file systems or directories, or files within file systems. For information on backing up individual files, see tar(1) or cpio(1).

    The following examples show how to use the most common ufsdump options and arguments:

    For other ufsdump options and arguments, see Chapter 23, UFS Backup and Restore Commands (Reference).

  8. If prompted, remove the tape and insert the next tape volume.
  9. Label each tape with the volume number, dump level, date, system name, disk slice, and file system.
  10. Bring the system back to run level 3 by pressing Control-D.
  11. Verify that the backup was successful.
    # ufsrestore tf device-name

Example 19-3 Performing a Full Backup of a UFS root (/) File system

The following example shows how to do a full backup of the root (/) file system. The system in this example is brought to single-user mode before the backup. The following ufsdump options are included:

For example:

# init 0
ok boot -s
.
.
.
# ufsdump 0ucf /dev/rmt/0 /
  DUMP: Date of this level 0 dump: Mon Jul 12 10:00:50 2010
  DUMP: Date of last level 0 dump: the epoch
  DUMP: Dumping /dev/rdsk/c0t0d0s0 (starbug:/) to /dev/rmt/0.
  DUMP: Mapping (Pass I) [regular files]
  DUMP: Mapping (Pass II) [directories]
  DUMP: Writing 63 Kilobyte records
  DUMP: Estimated 1843276 blocks (900.04MB).
  DUMP: Dumping (Pass III) [directories]
  DUMP: Dumping (Pass IV) [regular files]
  DUMP: 1843252 blocks (900.03MB) on 1 volume at 6602 KB/sec
  DUMP: DUMP IS DONE
  DUMP: Level 0 dump on Mon Jul 12 10:22:50 MDT 2010
# ufsrestore tf /dev/rmt/0
         2      .
         3      ./lost+found
         4      ./usr
         5      ./var
         6      ./export
         7      ./bin
         8      ./dev
.
.
.
# (Press Control-D to bring system to run level 3)

Example 19-4 Performing an Incremental Backup of a UFS root (/) File System

The following example shows how to do an incremental backup of the root (/) file system in single-user mode. The following ufsdump options are included:

# init 0
ok boot -s
# ufsdump 9ucf /dev/rmt/0 /
  DUMP: Date of this level 9 dump: Mon Jul 12 10:52:50 2010
  DUMP: Date of last level 0 dump: Mon Jul 12 10:50:50 2010
  DUMP: Dumping /dev/rdsk/c0t0d0s0 (starbug:/) to /dev/rmt/0.
  DUMP: Mapping (Pass I) [regular files]
  DUMP: Mapping (Pass II) [directories]
  DUMP: Mapping (Pass II) [directories]
  DUMP: Mapping (Pass II) [directories]
  DUMP: Writing 63 Kilobyte records
  DUMP: Estimated 422 blocks (211KB).
  DUMP: Dumping (Pass III) [directories]
  DUMP: Dumping (Pass IV) [regular files]
  DUMP: 376 blocks (188KB) on 1 volume at 1843 KB/sec
  DUMP: DUMP IS DONE
  DUMP: Level 9 dump on Mon Jul 12 10:55:50 2010
# ufsrestore tf /dev/rmt/0
         2      .
         9      ./etc
       304      ./etc/dumpdates
      1117      ./devices
      1118      ./devices/pseudo
      3381      ./devices/pseudo/pts@0:1
.
.
.
# init 0
ok boot -s
# ufsdump 9ucf /dev/rmt/0 /
  DUMP: Date of this level 9 dump: Mon Jul 12 10:33:14 2010
  DUMP: Date of last level 0 dump: the epoch
  DUMP: Dumping /dev/rdsk/c2t1d0s0 (v880-brm-03:/root) to /dev/rmt/0.
  DUMP: Mapping (Pass I) [regular files]
  DUMP: Mapping (Pass II) [directories]
  DUMP: Writing 63 Kilobyte records
  DUMP: Estimated 120694 blocks (58.93MB).
  DUMP: Dumping (Pass III) [directories]
  DUMP: Dumping (Pass IV) [regular files]
  DUMP: 120580 blocks (58.88MB) on 1 volume at 9026 KB/sec
  DUMP: DUMP IS DONE
  DUMP: Level 9 dump on Mon Jul 12 10:33:14 2010
# ufsrestore tf /dev/rmt/0
         2      .
         9      ./etc
       304      ./etc/dumpdates
      1117      ./devices
      1118      ./devices/pseudo
      3381      ./devices/pseudo/pts@0:1
.
.
.

Example 19-5 Performing a Full Backup of a UFS Home Directory

The following example shows how to do a full backup of the /export/home/kryten home directory. The following ufsdump options are included:

# ufsdump 0ucf /dev/rmt/0 /export/home/kryten
  DUMP: Date of this level 0 dump: Wed Jul 10:35:18 2010
  DUMP: Date of last level 0 dump: the epoch
  DUMP: Dumping /dev/rdsk/c0t0d0s7 (starbug:/export/home) to /dev/rmt/0.
  DUMP: Mapping (Pass I) [regular files]
  DUMP: Mapping (Pass II) [directories]
  DUMP: Writing 63 Kilobyte records
  DUMP: Estimated 105158 blocks (51.35MB).
  DUMP: Dumping (Pass III) [directories]
  DUMP: Dumping (Pass IV) [regular files]
  DUMP: 105082 blocks (51.31MB) on 1 volume at 5025 KB/sec
  DUMP: DUMP IS DONE
  DUMP: Level 9 dump on Mon Jul 12 10:38:14 2010
# ufsrestore tf /dev/rmt/0
       232      ./kryten
       233      ./kryten/filea
       234      ./kryten/fileb
       235      ./kryten/filec
       236      ./kryten/letters
       237      ./kryten/letters/letter1
       238      ./kryten/letters/letter2
       239      ./kryten/letters/letter3
       240      ./kryten/reports
       241      ./kryten/reports/reportA
       242      ./kryten/reports/reportB
       243      ./kryten/reports/reportC

Example 19-6 Performing a Full Backup to a Remote System (Solaris 10 Data to Solaris 10 System)

The following example shows how to do a full backup of a local /export/home file system on a Solaris 10 system (mars) to a tape device on a remote Solaris 10 system (earth) in single-user mode. The systems must be set up so that remote access is enabled. The following ufsdump options are included:

# ufsdump 0ucf earth:/dev/rmt/0 /export/home
  DUMP: Date of this level 0 dump: Mon Jul 12 10:36:30 MDT 2010
  DUMP: Date of last level 0 dump: the epoch
  DUMP: Dumping /dev/rdsk/c0t0d0s7 (mars:/export/home) to earth:/dev/rmt/0.
  DUMP: Mapping (Pass I) [regular files]
  DUMP: Mapping (Pass II) [directories]
  DUMP: Writing 63 Kilobyte records
  DUMP: Estimated 105172 blocks (51.35MB).
  DUMP: Dumping (Pass III) [directories]
  DUMP: Dumping (Pass IV) [regular files]
  DUMP: 105082 blocks (51.31MB) on 1 volume at 4425 KB/sec
  DUMP: DUMP IS DONE
  DUMP: Level 0 dump on Mon Jul 12 10:39:30 MDT 2010
# ufsrestore tf earth:/dev/rmt/0
         2      .
         3      ./lost+found
         4      ./kryten
         5      ./kryten/filea
         6      ./kryten/fileb
         7      ./kryten/filec
         8      ./kryten/letters
         9      ./kryten/letters/letter1
        10      ./kryten/letters/letter2
        11      ./kryten/letters/letter3
        12      ./kryten/reports
.
.
.