|Skip Navigation Links|
|Exit Print View|
|System Administration Guide: Devices and File Systems Oracle Solaris 10 1/13 Information Library|
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.
# /usr/lib/fs/ufs/fssnap -i /file-system
# /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
# ufsdump 0ucf /dev/rmt/0 /snapshot-name
# ufsdump 0ucf /dev/rmt/0 /dev/rfssnap/1
# ufsrestore tf /dev/rmt/0
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.
# 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.
# ufsrestore ta /dev/rmt/0
If you are using the tar command to back up the snapshot, mount the snapshot before backing it up.
# mkdir /backups/home.bkup
# mount -F ufs -o ro /dev/fssnap/1 /backups/home.bkup
# cd /backups/home.bkup
# tar cvf /dev/rmt/0 .
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 Restoring UFS Files and File System Backups (Task Map).