C H A P T E R 7 |
Recovering File Systems |
This chapter describes how to recover data when a SAM-QFS file system is corrupted or lost. The procedures vary, depending on the type of file system and whether you have recent samfsdump(1M) output for the file system. You might require assistance from your ASP or Sun Microsystems customer support.
This chapter contains the following sections
If you have samfsdump(1M) metadata output for a file system, you can use the samfsrestore(1M) command or File System Manager to recover a file system that has been corrupted, accidentally remade, or destroyed. For details about the syntax and options used in the procedure, see the samfsdump(1M) man page or the File System Manager online Help.
|
1. From the Servers page, click the name of the server that contains the file system that you want.
The File Systems Summary page is displayed.
2. Navigate to the File Browsing & Recovery node in the navigation tree.
The File Browser page is displayed.
3. Use the file system mount point down menu to choose the file system you want to restore.
A set of radio buttons displays on the top right corner of the table: Live Data and Recovery Point.
4. Select the Recovery Point radio button and choose a date of the recovery point you want to restore.
The contents of the selected recovery point are displayed.
5. Locate the file you want to restore by browsing within the File Browser.
6. Select Restore Entire Recovery Point... from the Operations drop-down menu.
The Restore window is displayed.
7. Specify the location to which you want to restore the file or directory.
By default, the location is the path of the original file or directory, relative to the mount point of the file system. You can specify a different path relative to the mount point, or you can specify an absolute path on any archiving file system.
8. From the Online Status After Restoring drop-down menu, choose the actions that you want the file system to take after completing the restore process.
|
1. Use the cd(1M) command to change to the mount point for the file system or to the directory in which you want to restore the file system.
In the following example, the mount point is /sam1.
2. Use the samfsrestore command with the -T and -f options to restore the entire file system relative to the current directory.
Use the syntax shown in the following example, specifying the path name of the dump file after the -f option and the path name of the restore log file after the -g option.
You can use the restore log file as input to the restore.sh script to stage back files that were online at the time of the dump.
You may be able to recover data from a SAM-QFS file system even if you do not have access to output from a samfsdump(1M) command, or to an archiver log file.
The following procedure shows you how to re-create user files by reloading tape or optical disk and using the star(1M) command's -n option.
Note - Recovering file systems from archive cartridges and using the star command is a tedious and time-consuming process. This should not be considered the standard procedure for disaster recovery. |
|
1. (Optional) Disable any automated processes that are related to Sun StorageTek SAM operations.
If any of the following automated processes are running, disable them during the recovery process to ensure that no data is lost:
Disable any recycling activities, including those triggered by an entry in root's crontab(4). Failure to disable recycling activity could result the recycling and relabeling of tapes that contain active data.
Suspending these processes saves an existing samfsdump output file, and provides an opportunity for easier recovery.
2. (Optional) Disable network file system (NFS) sharing for the file system.
It can be easier to recover data if the file system is not running NFS sharing on the file systems during the recovery period.
3. Use the sammkfs(1M) command to remake the SAM-QFS file system to be restored.
4. Identify the cartridges that contain the archive copy information.
5. Read all the archive media.
If you are using tapes, use the tar(1M), gnutar(1M), or star(1M) command.
6. If recovering from tape media, use the tarback.sh script.
The tarback.sh script is located in /opt/SUNWsamfs/examples/tarback.sh. This script identifies a single tape drive for use during recovery and provides a list of VSNs to recover. The script uses star(1M) to loop through a volume, reading all available archive files.
The star(1M) command is an enhanced version of gnutar(1M). The tarback.sh script uses star(1M) and the -n option, which restores only files that are newer than the existing copy. If the archive copy that you are about to restore is older than the existing copy, the restore is skipped.
The tarback.sh script is described in Backup and Recovery Commands and Tools. For more information about this script, see the tarback.sh man page. See also Unreadable Label With No Other Copies Available for an example of how to use the script.
7. If recovering from magnetic-optical media, contact Sun customer support.
Copyright © 2007, Sun Microsystems, Inc. All Rights Reserved.