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

Document Information

About This Book

1.  Managing Removable Media (Overview)

2.  Managing Removable Media (Tasks)

3.  Accessing Removable Media (Tasks)

4.  Writing CDs and DVDs (Tasks)

5.  Managing Devices (Overview/Tasks)

6.  Dynamically Configuring Devices (Tasks)

7.  Using USB Devices (Overview)

8.  Using USB Devices (Tasks)

9.  Using InfiniBand Devices (Overview/Tasks)

10.  Managing Disks (Overview)

11.  Administering Disks (Tasks)

12.  SPARC: Setting Up Disks (Tasks)

13.  x86: Setting Up Disks (Tasks)

14.  Configuring Oracle Solaris iSCSI Targets and Initiators (Tasks)

15.  The format Utility (Reference)

16.  Managing File Systems (Overview)

17.  Creating and Mounting File Systems (Tasks)

18.  Using The CacheFS File System (Tasks)

19.  Configuring Additional Swap Space (Tasks)

20.  Checking UFS File System Consistency (Tasks)

21.  UFS File System (Reference)

22.  Backing Up and Restoring UFS File Systems (Overview)

23.  Backing Up UFS Files and File Systems (Tasks)

24.  Using UFS Snapshots (Tasks)

Using UFS Snapshots (Task Map)

UFS Snapshots Overview

Why Use UFS Snapshots?

UFS Snapshots Performance Issues

Creating and Deleting UFS Snapshots

Creating a Multiterabyte UFS Snapshot

How to Create a UFS Snapshot

How to Display UFS Snapshot Information

Deleting a UFS Snapshot

How to Delete a UFS Snapshot

Backing Up a UFS Snapshot

How to Create a Full Backup of a UFS Snapshot (ufsdump)

How to Create an Incremental Backup of a UFS Snapshot (ufsdump)

How to Back Up a UFS Snapshot (tar)

Restoring Data From a UFS Snapshot Backup

25.  Restoring UFS Files and File Systems (Tasks)

26.  UFS Backup and Restore Commands (Reference)

27.  Copying Files and File Systems (Tasks)

28.  Managing Tape Drives (Tasks)

Index

Backing Up a UFS Snapshot

You can create a full backup or an incremental backup of a UFS snapshot. You can use the standard Solaris backup commands to back up a UFS snapshot.

The virtual device that contains the UFS snapshot acts as a standard read-only device. So, you can back up the virtual device as if you were backing up a file system device.

If you are using the ufsdump command to back up a UFS snapshot, you can specify the snapshot name during the backup. See the following procedure for more information.

How to Create a Full Backup of a UFS Snapshot (ufsdump)

  1. Become superuser or assume an equivalent role.
  2. Identify the UFS snapshot to be backed up.
    # /usr/lib/fs/ufs/fssnap -i /file-system
     

    For example:

    # /usr/lib/fs/ufs/fssnap -i /usr
    Snapshot number               : 1
    Block Device                  : /dev/fssnap/1
    Raw Device                    : /dev/rfssnap/1
    Mount point                   : /usr
    Device state                  : idle
    Backing store path            : /var/tmp/snapshot2
    Backing store size            : 544 KB
    Maximum backing store size    : Unlimited
    Snapshot create time          : Mon Jul 12 10:37:50 2010
    Copy-on-write granularity     : 32 KB
  3. Back up the UFS snapshot.
    # ufsdump 0ucf /dev/rmt/0 /snapshot-name

    For example:

    # ufsdump 0ucf /dev/rmt/0 /dev/rfssnap/1 
  4. Verify that the snapshot has been backed up.

    For example:

    # ufsrestore tf /dev/rmt/0

How to Create an Incremental Backup of a UFS Snapshot (ufsdump)

Backing up a UFS snapshot incrementally means that only the files that have been modified since the last snapshot are backed up. Use the ufsdump command with the N option. This option specifies the file system device name to be inserted into the /etc/dumpdates file for tracking incremental dumps.

The following ufsdump command specifies an embedded fssnap command to create an incremental backup of a file system.

  1. Become superuser or assume an equivalent role.
  2. Create an incremental backup of a UFS snapshot.

    For example:

    # ufsdump 1ufN /dev/rmt/0 /dev/rdsk/c0t1d0s0 `fssnap -F ufs -o raw,bs=
    /export/scratch,unlink /dev/rdsk/c0t1d0s0`

    In this example, the -o raw option is used to display the name of the raw device instead of the block device. By using this option, you make it easier to embed the fssnap command in commands (such as the ufsdump command) that require the raw device instead.

  3. Verify that the snapshot has been backed up.
    # ufsrestore ta /dev/rmt/0

How to Back Up a UFS Snapshot (tar)

If you are using the tar command to back up the snapshot, mount the snapshot before backing it up.

  1. Become superuser or assume an equivalent role.
  2. Create a mount point for the snapshot.

    For example:

    # mkdir /backups/home.bkup
  3. Mount the snapshot.
    # mount -F ufs -o ro /dev/fssnap/1 /backups/home.bkup
  4. Change to the mounted snapshot directory.
    # cd /backups/home.bkup
  5. Back up the snapshot with the tar command.
    # tar cvf /dev/rmt/0 .

Restoring Data From a UFS Snapshot Backup

The backup created from the virtual device is essentially just a backup of what the original file system looked like when the snapshot was taken. When you restore a file system from the backup, restore as if you had taken the backup directly from the original file system. Such a restore uses the ufsrestore command. For information on using the ufsrestore command to restore a file or file system, see Chapter 25, Restoring UFS Files and File Systems (Tasks).