PRIMECLUSTER Global File Services Configuration and Administration Guide 4.2 (Solaris(TM) Operating Environment) |
Contents Index |
Part 3 Global File Services Shared File System | > Chapter 24 File System Backing-up and Restoring | > 24.2 Backing Up and Restoring using sfcdump(1M) and sfcrestore(1M) |
This section explains the procedure for fully restoring a GFS Shared File System from a backup tape described in the previous section. The sfcrestore(1M) command can also restore a GFS Shared File System backup to a different GFS Shared File System. The restore procedure shown below applies when a backup and restore are performed in the same GFS Shared File System.
If a different GFS Shared File System is to be restored, note the capacity of the restoration destination. Restoration may fail because of insufficient capacity.
1. Set for super user.
% su
2. If the destination GFS Shared File System is mounted, unmount it.
3. Use the sfcnewfs(1M) command to re-create the GFS Shared File System on the restoration destination. Use the same options and arguments as those used for creating this file system.
In addition, add the -Z option for instructing new creation. The following is shows an example of specifying "sfcnewfs -H kaede,ichou /dev/sfdsk/gfs/rdsk/volume1" for creating a file system before execution:
# sfcnewfs -Z -H kaede,ichou /dev/sfdsk/gfs/rdsk/volume1
When a GFS Shared File System is created, the contents of the previously created GFS Shared File System are lost.
4. Mount the GFS Shared File System.
5. After the file system is mounted, change the current working directory to the mount point.
# cd /mnt
6. Insert the appropriate tape, and execute the sfcrestore(1M) command to restore the GFS Shared File System from the tape.
# sfcrestore rvf /dev/rmt/0 Verify volume and initialize maps Media block size is 126 Dump date: Wed May 24 13:28:08 2000 Dumped from: the epoch Level 0 dump of /mnt on kaede: /dev/sfdsk/gfs/rdsk/volume1 Label: none Begin level 0 restore Initialize symbol table. Extract directories from tape Calculate extraction list. Warning: ./lost+found: File exists Make node ./etc Make node ./etc/default ... extract file ./etc/fs/nfs/mount extract file ./etc/fs/ufs/mount Add links Set directory mode, owner, and times. Check the symbol table. Check pointing the restore
Each character of rvf in the first parameter has the following meaning:
To restore an incremental backup, restore the level 0 backup tape according to step 6 and then repeat step 6 in ascending order based on the backup level.
7. Delete the restoresymtable file, which is a temporary file created by the sfcrestore(1M) command.
# rm /mnt/restoresymtable
8. To restore a GFS Shared File System that uses the quota function, execute the sfcquotadm(1M) command with the -i option specified to reflect the contents of an external quotas file to the internal quotas file. For information on the sfcquotadm(1M) command, see Appendix F.2.22 "sfcquotadm(1M)." This step is not required if a quota function is not used.
# sfcquotadm -i /mnt
9. Move to a different directory.
# cd /
10. Umount the newly restored GFS Shared File System.
11. Execute the sfcdump(1M) command to fully backup the newly restored the GFS Shared File System. Insert a tape and then execute the sfcdump(1M) command to backup the GFS Shared File System.
# sfcdump 0ucf /dev/rmt/0 /mnt
Backup the entire GFS Shared File System immediately after it has been restored. This must be done because the assignment of the i-node numbers changes after restoration using the sfcrestore(1M) command. An incremental backup cannot correctly generate from a newly restored GFS Shared File System.
12. Mount the restored GFS Shared File System.
Contents Index |