Certification Objective 9.04Restoring a UFS Snapshot


Certification Objective 9.04—Restoring a UFS Snapshot

Exam Objective 6.4: Restore data from a UFS snapshot and delete the UFS snapshot.

In a previous section you learned how to create a UFS snapshot and then back up the snapshot. The fssnap command creates a virtual device that you can backup by using a suitable backup command, such as tar, cpio, or even ufsdump. The backup created from the virtual device is essentially a backup of the original file system as it existed when the snapshot was taken. For all practical purposes, you can forget that a snapshot was ever taken and look at this backup as though it were any other backup. In other words, you can restore this backup just like any other backup by using the ufsreatore command. This relationship between direct backups, backups through snapshots, and restores is illustrated in Figure 9-2.

image from book
Figure 9-2: Relationship between direct backups, backups through snapshots, and restores

On occasion, you will need to delete a UFS snapshot, and before deleting you may need to get information about the snapshot. You can retrieve the information about the current snapshots on the system by using the fssnap command with the following syntax:

    fssnap -i [<fileSystem>] 

The <fileSystem> argument is to specify the file system whose snapshot you want to see. If you do not specify <fileSystem> in your command, information about all of the current UFS snapshots on the system is displayed. For example, the following command will display the information about the snapshot of the /export/home file system:

    fssnap -i /export/home 

The output of this command will look like the following:

    Snapshot number : 1    Block Device : /dev/fssnap/1    Raw Device : /dev/rfssnap/1    Mount point : /export/home    Device state : idle    Backing store path : /var/tmp/home.snap0    Backing store size : 0 KB    Maximum backing store size : Unlimited    Snapshot create time : Fri Apr 15 17:15:25 2005    Copy-on-write granularity : 32 KB 

You can delete a snapshot by using one of two methods: reboot the system or issue the fssnap command with the following syntax:

    fssnap -d <fileSystem> 

You must specify the value of <fileSystem>, which is the path of the file system whose snapshot is to be removed.

image from book
Exam Watch

When you reboot the system, all snapshots are deleted.

image from book

If you used the -o unlink option in the command to create the snapshot, the backing-store file will automatically be deleted once you delete the snapshot. It you did not use the unlink option in the creation of the snapshot, you need to delete the backing-store file manually; you should, because it is occupying disk space.

The three most important takeaways from this chapter are the following:

  • You can use the ufsdump command to make full and incremental backups of file systems. You use the ufsdump command when the file system is unmounted or the Solaris system is in single-user mode.

  • If you need to make a backup of an active file system (mounted and in multiuser mode), you can take a snapshot of the system by using the fssnap command and then make a backup of the snapshot by using a backup command such as cpio, tar, or ufsdump.

  • You can restore a backup by using the ufsrestore command.




Sun Certified System Administrator for Solaris 10 Study Guide Exams 310-XXX & 310-XXX
Sun Certified System Administrator for Solaris 10 Study Guide Exams 310-XXX & 310-XXX
ISBN: N/A
EAN: N/A
Year: 2005
Pages: 168

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net