Intermediate System Administration for the Solaris 10 Operating Student Guide phần 10 pot

65 234 0
Intermediate System Administration for the Solaris 10 Operating Student Guide phần 10 pot

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Exercise: Backing Up a File System (Level 1) 14-16 Intermediate System Administration for the Solaris™ 10 Operating System Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1 ● Use the ufsdump command to do an incremental backup of the /export/home file system. (Steps 7–9 in the Level 2 lab) ● Use the mt command to remove the tape from the tape drive. ● Review the /etc/dumpdates file. (Steps 10–12 in the Level 2 lab) Exercise: Backing Up a File System (Level 2) Performing File System Backups 14-17 Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1 Exercise: Backing Up a File System (Level 2) In this exercise, you back up an available file system on your system. Preparation This exercise requires a system that is configured with a tape drive and a file system that is available to unmount. This exercise assumes that the /export/home file system exists on a separate partition from the / (root) file system and can be unmounted. Identify the slice on which the /export/home file system resides. Get a tape that is appropriate for your system from the instructor. Remote Lab Data Center (RLDC) In addition to being able to use local classroom equipment, this lab has also been designed to use equipment located in a remote lab data center. Directions for accessing and using this resource can be found at: http://fn1.brom.suned.com/ Ask your instructor for the particular SSH (Secure Shell) configuration file you should use to access the appropriate remote equipment for this exercise. In the RLDC environment, a tape should already be present in your tape drive. Do not eject the tape with an mt command, or you cannot continue with the lab. Task Summary In this exercise, you accomplish the following: ● Use the mt command to rewind the tape to the beginning. ● Use the ufsdump command to create a tape backup of the /export/home file system. ● Add files and directories to the /export/home file system. ● Use the ufsdump command to do an incremental backup of the /export/home file system. ● Use the mt command to remove the tape from the tape drive. ● Review the /etc/dumpdates file. Exercise: Backing Up a File System (Level 2) 14-18 Intermediate System Administration for the Solaris™ 10 Operating System Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1 Tasks Complete the following steps: 1. Unmount the /export/home file system. If your system reports that the /export/home file system is busy, use the umount -f command. 2. Insert a tape into your tape drive. 3. Use the mt command to rewind the tape to the beginning. 4. Use the ufsdump command to create a backup for the /export/home file system. Make sure that the /etc/dumpdates file is updated. 5. Mount the /export/home file system. 6. Copy the contents of the /etc/uucp directory to the /export/home directory. 7. Unmount the /export/home file system. 8. Move the tape to the next tape record. 9. Use the ufsdump command to create an incremental backup for the /export/home file system, using a non-rewinding device. 10. Rewind and eject the tape from the tape drive. 11. Set the tape aside for use with subsequent labs. 12. Review the contents of the /etc/dumpdates file. 13. Mount the /export/home file system. Exercise: Backing Up a File System (Level 3) Performing File System Backups 14-19 Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1 Exercise: Backing Up a File System (Level 3) In this exercise, you back up an available file system on your system. Preparation This exercise requires a system that is configured with a tape drive and file system that is available to unmount. This exercise assumes that the /export/home file system exists on a separate partition from the / (root) file system and can be unmounted. Identify the slice on which the /export/home file system resides. Get a tape that is appropriate for your system from the instructor. Remote Lab Data Center (RLDC) In addition to being able to use local classroom equipment, this lab has also been designed to use equipment located in a remote lab data center. Directions for accessing and using this resource can be found at: http://fn1.brom.suned.com/ Ask your instructor for the particular SSH (Secure Shell) configuration file you should use to access the appropriate remote equipment for this exercise. In the RLDC environment, a tape should already be present in your tape drive. Do not eject the tape with an mt command, or you cannot continue with the lab. Task Summary In this exercise, you accomplish the following: ● Use the mt command to rewind the tape to the beginning. ● Use the ufsdump command to create a tape backup of the /export/home file system. ● Add files and directories to the /export/home file system. ● Use the ufsdump command to do an incremental backup of the /export/home file system. ● Use the mt command to remove the tape from the tape drive. ● Review the /etc/dumpdates file. Exercise: Backing Up a File System (Level 3) 14-20 Intermediate System Administration for the Solaris™ 10 Operating System Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1 Tasks and Solutions Complete the following steps: 1. Unmount the /export/home file system. If your system reports that the /export/home file system is busy, use the umount -f command. # umount /export/home 2. Insert a tape into your tape drive. 3. Use the mt command to rewind the tape to the beginning. # mt rewind 4. Use the ufsdump command to create a backup tape for the /export/home file system, where c # t # d # s # represents. If you cannot remember which device the/export/home file system was mounted on, view the contents of the /etc/vfstab file with the more command. # ufsdump 0uf /dev/rmt/0 /dev/rdsk/c # t # d # s # You should see output similar to: ufsdump 0uf /dev/rmt/0 /dev/rdsk/c0d0t0s7 DUMP: Writing 32 Kilobyte records DUMP: Date of this level 0 dump: Mon Oct 11 12:30:44 2004 DUMP: Date of last level 0 dump: the epoch DUMP: Dumping /dev/rdsk/c0t0d0s7 (sys43:/export/home) to /dev/rmt/0. DUMP: Mapping (Pass I) [regular files] DUMP: Mapping (Pass II) [directories] DUMP: Estimated 1126 blocks (563KB). DUMP: Dumping (Pass III) [directories] DUMP: Dumping (Pass IV) [regular files] DUMP: Tape rewinding DUMP: 1086 blocks (543KB) on 1 volume at 1803 KB/sec DUMP: DUMP IS DONE DUMP: Level 0 dump on Mon Oct 11 12:44:12 2004 5. Mount the /export/home file system. # mount /export/home 6. Copy the contents of the /etc/uucp directory to the /export/home directory. # cp -r /etc/uucp /export/home 7. Unmount the /export/home file system. # umount /export/home 8. Move the tape to the next tape record. # mt -f /dev/rmt/0n fsf 1 Exercise: Backing Up a File System (Level 3) Performing File System Backups 14-21 Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1 9. Use the ufsdump command to create an incremental backup for the /export/home file system, using a non-rewinding device. # ufsdump 1uf /dev/rmt/0n /dev/rdsk/c # t # d # s # You should see output similar to: ufsdump 1uf /dev/rmt/0n /dev/rdsk/c0d0t0s7 DUMP: Writing 32 Kilobyte records DUMP: Date of this level 0 dump: Mon Oct 11 13:13:03 2004 DUMP: Date of last level 0 dump: Mon Oct 11 12:30:44 2004 DUMP: Dumping /dev/rdsk/c0t0d0s7 (sys43:/export/home) to /dev/rmt/0. DUMP: Mapping (Pass I) [regular files] DUMP: Mapping (Pass II) [directories] DUMP: Estimated 320 blocks (160KB). DUMP: Dumping (Pass III) [directories] DUMP: Dumping (Pass IV) [regular files] DUMP: 318 blocks (159KB) on 1 volume at 691 KB/sec DUMP: DUMP IS DONE DUMP: Level 1 dump on Mon Oct 11 13:22:36 2004 10. Rewind and eject the tape from the tape drive. # mt -f /dev/rmt/0 offline 11. Set the tape aside for use with subsequent labs. 12. Review the contents of the /etc/dumpdates file. # more /etc/dumpdates You should see one line showing information for the Level 0 dump and another line for the Level 1 dump, for example: /dev/rdsk/c0t0d0s7 0 Mon Oct 11 12:30:44 2004 /dev/rdsk/c0t0d0s7 1 Mon Oct 11 13:13:03 2004 13. Mount the /export/home file system. # mount /export/home Exercise Summary 14-22 Intermediate System Administration for the Solaris™ 10 Operating System Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1 Exercise Summary ? ! Discussion – Take a few minutes to discuss what experiences, issues, or discoveries you had during the lab exercise. ● Experiences ● Interpretations ● Conclusions ● Applications 15-1 Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1 Module 15 PerformingFileSystemRestores Objectives Upon completion of this module, you should be able to restore ufs file systems. The following course map in Figure 15-1 shows how this module fits into the current instructional goal. Figure 15-1 Course Map Performing File System Backups Performing File System Restores Backing Up a Mounted File System With a Snapshot Performing System Backups and Restores Restoring a ufs File System 15-2 Intermediate System Administration for the Solaris™ 10 Operating System Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1 Restoring a ufs File System You restore a file system to rebuild a damaged file system, to reinstall or upgrade the Solaris OS software, or to reorganize file systems on existing or new disks. Restoring a Regular File System When you are restoring data to a system, consider the following questions: ● Can the system boot on its own (regular file system restore)? ● Do you need to boot the system from CD-ROM, DVD, or network (critical file system restore)? ● Do you need to boot the system from CD-ROM, DVD, or network and repair the boot drive (special case recovery)? To restore files or file systems, determine the following: ● The file system backup tapes that are needed ● The device name to which you will restore the file system ● The name of the temporary directory to which you will restore individual files ● The type of backup device to be used (local or remote) ● The backup device name (local or remote) To restore a regular file system, such as the /export/home or /opt file system, back up to the disk, you use the ufsrestore command. The ufsrestore command copies files to the disk, relative to the current working directory, from backup tapes that were created by the ufsdump command. You can use the ufsrestore command to reload an entire file system hierarchy from a Level 0 backup and related incremental backups. You can also restore one or more single files from any backup tape. The format for the ufsrestore command is: ufsrestore option(s) argument(s) filesystem Restoring a ufs File System Performing File System Restores 15-3 Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1 Table 15-1 describes some options that you can use with the ufsrestore command. When you restore an entire file system from a backup tape, the system creates a restoresymtable file. The ufsrestore command uses the restoresymtable file for check-pointing or passing information between incremental restores. You can remove the restoresymtable file when the restore is complete. Using the ufsrestore Command to Restore a Regular File System The following procedure demonstrates how to use the ufsrestore command to restore the /opt file system on the c0t0d0s5 slice. 1. Create the new file system structure. # newfs /dev/rdsk/c0t0d0s5 2. Mount the file system to the /opt directory, and change to that directory. # mount /dev/dsk/c0t0d0s5 /opt # cd /opt Table 15-1 Options for the ufsrestore Command Option Description t Lists the table of contents of the backup media. r Restores the entire file system from the backup media. x file1 file2 Restores only the files named on the command line. i Invokes an interactive restore. v Specifies verbose mode. This mode displays the path names to the terminal screen as each file is restored. f device Specifies the tape device name. When not specified, the /dev/rmt/0 device file is used. [...]... Record what happens Boot the system from the Solaris 10 OS Software 1 of 4 CD-ROM or DVD to run level S Create a new file system on the / (root) slice Use the ufsrestore command to reload the / (root) file system Install a new boot block Reboot the system, and eject the CD-ROM/DVD Intermediate System Administration for the Solaris 10 Operating System Copyright 2005 Sun Microsystems, Inc All Rights Reserved... remove the following critical system directories and their contents: /kernel, /platform, and /devices 2 Press the Stop-A key sequence to abort the operating system Attempt to boot the system from the boot disk What happens? 3 Insert the Solaris 10 Software 1 of 4 CD-ROM or DVD Boot the system from the CD-ROM/DVD to run level S 4 Use the newfs command to create a new file system on the / (root) slice (The. .. Recovering Backup Files and File Systems (Level 3) 9 Change to the / (root) directory, and unmount the new file system # cd / # umount /a 10 Reboot the system # init 6 11 Log in as the root user, and open a terminal window Eject the Solaris 10 Software 1 CD-ROM or DVD # eject cdrom 15-26 Intermediate System Administration for the Solaris 10 Operating System Copyright 2005 Sun Microsystems, Inc All Rights Reserved... Abort the operating system, and attempt to boot the system from disk Record what happens Boot the system from the Solaris 10 Software 1 of 4 CD-ROM or DVD to run level S Create a new file system on the / (root) slice Use the ufsrestore command to reload the / (root) file system Install a new boot block Reboot the system, and eject the CD-ROM/DVD (Steps 1–11 in Task 4 of the Level 2 lab) 15-16 Intermediate. .. /dev/rdsk/c0t0d0s5 7 Perform a full backup of the file system # ufsdump 0uf /dev/rmt/0 /dev/rdsk/c0t0d0s5 Note – The system administrator should always back up the newly created file system because the ufsrestore command repositions the files and changes the inode allocation 8 init 6 Restoring the /usr File System To restore the /usr file system, boot from the Solaris 10 Software 1 CD-ROM or DVD, and then use the ufsrestore... 8 3905 Intermediate System Administration for the Solaris 10 Operating System Copyright 2005 Sun Microsystems, Inc All Rights Reserved Sun Services, Revision A.1 Restoring a ufs File System Note – The ufsrestore command has to find the selected files If you used more than one tape for the backup, first insert the tape with the highest volume number and type the appropriate number at this point Then repeat,... 6 Install the bootblk in Sectors 1 through 15 of the boot disk To do this, change to the directory that contains the bootblk, and enter the installboot command # cd /usr/platform/`uname -m`/lib/fs/ufs # installboot bootblk /dev/rdsk/c0t0d0s0 7 Unmount the new file system # cd / # umount /a 15-6 Intermediate System Administration for the Solaris 10 Operating System Copyright 2005 Sun Microsystems, Inc... slice should match the one you used earlier in the exercise when you created a backup of the / (root) file system. ) Run the fsck command on the file system that you create 5 Verify that your root backup tape is in the tape drive Mount the new file system as the /a file system Change to the /a directory 6 Use the ufsrestore command to load the / (root) data into the new file system 7 Remove the restoresymtable... to the /usr partition Note – If the / (root), /usr, or /var file systems are unusable because of some type of corruption or damage, the system will not boot 15-4 Intermediate System Administration for the Solaris 10 Operating System Copyright 2005 Sun Microsystems, Inc All Rights Reserved Sun Services, Revision A.1 Restoring a ufs File System Using the ufsrestore Command to Restore a Critical File System. .. pointing the restore extract file /file1 extract file /file2 extract file /file3 Add links Set directory mode, owner, and times Check the symbol table Check pointing the restore # 15 -10 Intermediate System Administration for the Solaris 10 Operating System Copyright 2005 Sun Microsystems, Inc All Rights Reserved Sun Services, Revision A.1 Restoring a ufs File System 6 Load the next lower-level tape into the . /dev/rdsk/c0t0d0s6 9. Reboot the system. # init 6 Restoring a ufs File System 15-6 Intermediate System Administration for the Solaris 10 Operating System Copyright 2005 Sun Microsystems, Inc. All Rights. /export/home file system from incremental tapes. Restoring a ufs File System 15 -10 Intermediate System Administration for the Solaris 10 Operating System Copyright 2005 Sun Microsystems, Inc. All. File System (Level 1) 14-16 Intermediate System Administration for the Solaris 10 Operating System Copyright 2005 Sun Microsystems, Inc. All Rights Reserved. Sun Services, Revision A.1 ● Use the

Ngày đăng: 12/08/2014, 22:21

Từ khóa liên quan

Tài liệu cùng người dùng

Tài liệu liên quan