Section 10.2. Preparing for an Interactive Restore


10.2. Preparing for an Interactive Restore

The easiest way to get started using flash archive is to create backups for an interactive restore. This requires more work during the recovery process, but you'll have a bootable backup in only a few minutes. Later in this chpater, we'll explain how to take this backup to the next level by making the restore proceed without interaction.

10.2.1. Creating Flash Archive Images

Building a solid, repeatable, and tested backup process is the key to being able to restore when you need to. This section describes the steps required to create a flash archive image, from determining which filesystems to include to the tape creation process (if desired).

10.2.1.1. Determining filesystems to back up

While any filesystem can be included in a flash archive, typically, only OS filesystems are required to restore a Solaris system. Data restored from filesystems not created during the recovery process is likely to be restored to the root filesystem. This could have serious consequences, especially if the total amount of data to restore exceeds the size of the root filesystem.

If you plan on performing a noninteractive restore, and you decide to include any non-OS filesystems in the backup, you need to include those filesystems in your profile file if you would like them created prior to the restore. (Noninteractive setup is covered later in this chapter.)


10.2.1.2. Using flar create

flar create is the Solaris utility that creates flash images. The process can either be scripted and run through a scheduler, such as cron, or run manually. If you run flar create manually and you plan to perform a noninteractive restore, the image should be created on disk and then copied to tape, due to prerequisites in the tape creation process.

The flar manpages provide current syntax and usage of the command. Here are the options used in the examples:


create

Tells flar to create an archive.


info

Without any additional flags, info examines an archive and displays the summary information it finds in the archive. If given the additional -l flag, it displays the files found in the archive. (create and info are mutually exclusive options.)


-c

Tells flar to compress the archive as it's writing it.


-n

Gives the archive a name that is stored inside the archive. We can query this name later in case the filename we stored it under isn't very helpful.


filename or tape_device

Passes flar the name of a filename or tape device to write to.

Here is an example of the flar create process running on a Solaris 9 system. In this example, flar compresses the archive (-c), gives it a name of sun2.flar (-n sun2.flar), and uses sun2.flar as the filename to back up to as well:

# flar create -c -n sun2.flar sun2.flar Full Flash Checking integrity... Integrity OK. Running precreation scripts... Precreation scripts done. Determining the size of the archive...   3949130 blocks The archive will be approximately 1.01GB. Creating the archive... 3949130 blocks Archive creation complete. # echo $? 0

Note that at the end of the archive, we checked the return code by entering echo $?. The Solaris return code is the primary method of determining the result of the flar create command. A return code of zero indicates a successful completion while any nonzero return code indicates a failure.

After receiving a zero return code from the flar create command, you can use the flar info and flar info -l commands to ensure that the image creation process was successful. If the return code of flar create or the output of either flar info command indicates a problem, the archive should be considered suspect. The following example shows an example of the flar info imagename command:

# flar info sun2.flar archive_id=c80af5b0c18ef7a9375e124c07f56875 files_archived_method=cpio creation_date=20060211192433 creation_master=sun2 content_name=sun2.flar creation_node=sun2 creation_hardware_class=sun4m creation_platform=SUNW,SPARCstation-5 creation_processor=sparc creation_release=5.9 creation_os_name=SunOS creation_os_version=Generic_118558-11 files_compressed_method=compress files_archived_size=470522936 content_architectures=sun4m type=FULL    

In addition to displaying general information about the flash archive image, you can actually display a list of files included in the image using the flar info l imagename command:

# flar info -l sun2.flar lost+found export export/home0 export/home0/lost+found export/home0/rules export/home0/rules.ok export/home0/sysidcfg export/home0/standard.profile ~list truncated~ platform/sun4u/kernel/drv/sparcv9 platform/sun4u/kernel/drv/sparcv9/scmi2c

10.2.1.3. Creating a flash archive tape

Once the disk image has been created, you can create a tape to perform a bare-metal recovery. All you have to do is use the dd command:

# mt f /dev/rmt/0n rewind # dd if=sun2.flar of=/dev/rmt/0n obs=1024000

When creating a flash tape, use a tape drive that uses native Solaris OS drivers and does not use nonstandard entries in the /kernel/drv/st.conf file. Using nonstandard entries in the st.conf file may cause problems not noticed until performing a restore.


10.2.2. Bare-Metal Recovery with Flash Archive

Now that we've created a flash archive image, let's use it to perform an interactive restore of a Solaris system. To do this, perform the following steps:

  1. First, ensure that the system is powered on and that it is at the ok> prompt.

  2. If you are unsure whether your boot and recovery devices are available, you can ensure they are by performing a probe:

  3. ok> probe-scsi-all                      

  4. A list of locally attached devices should be displayed. Ensure that at the minimum, the local boot disk, a CD/DVD drive (if applicable), and the correct SCSI tape drives are listed.

  5. If you plan to restore from tape, insert the tape into a local tape drive.

  6. Boot the system:

    1. If you are booting from CD, insert the Solaris Installation CD into the appropriate device on the system you want to restore and enter boot cdrom at the ok> prompt.

    2. If you have a network boot server configured, you may also boot from the network using the boot net install command.

  7. The system then boots, and you are taken through the standard Solaris installation prompts. Once you reach the Specify Media prompt, select 5 to restore from local tape, or 2 to restore from an NFS mount.

    1. If you select tape, you are prompted for the tape device name and the tape file in which the image is located. Remember that 0 is the first file on the tape.

    2. If you select NFS, you are prompted for the name of the NFS server and share where your flash archive images are located. You will then need to select an image from the images it finds there.

  8. You are then prompted for the name of the disk you wish to restore to and asked how you would like it partitioned. Answer the prompts according to your environment.

  9. Once those steps are done, the recovery should complete automatically, followed by a reboot.

10.2.2.1. An interactive recovery example

The following example restores an image from tape. If your images are on disk, you would select option 2 instead of option 5.

Please specify the media from which you will install the Solaris Operating Environment. Media: 1. CD/DVD 2. Network File System 3. HTTP (Flash archive only) 4. FTP (Flash archive only) 5. Local Tape (Flash archive only)    Media [1]: 5  Please specify the local tape device and the position on the tape where the Flash archive is located. To select a different media, enter B to go Back.    Tape Device or B [/dev/rmt/0] /dev/rmt/0n    Tape Position or B [1] 0 You selected the following Flash archives for initial install:  Tape  /dev/rmt/0n      0 Press Return to continue or enter D to deselect all archives: <enter>  To select additional Flash archives, please specify the media where the archives are located. Media: 1. CD/DVD 2. Network File System 3. HTTP 4. FTP 5. Local Tape 6. None - Archive Selection Complete  If there are archives that contain additional filesystems, you can specify them here.    Media [6]: <enter>  The system is being initialized, please wait... - Select which disks you want to lay out the file systems on. Available Disks:    Disk      Size  c0t0d0    4000 MB Enter 'y' to layout file systems on the specified disk.  This will erase all existing data on the disk.  Enter 'n' to leave the disk unmodified.  Enter 'e' to leave the remaining disks unmodified and continue with install. Layout file systems on disk c0t0d0 (bootdisk) (y/n) [y]? y  At least one of the disks selected for installing Solaris software has file systems or unnamed slices that you can choose to preserve. Do you want to preserve existing data? Enter y to preserve data or n to skip data preservation. [n] <enter>  The Solaris Installer is determining size requirements based on your choices,  please wait...  \ File System operations: 1. Print the current partition table 2. Modify a disk's partition table 3. Return to beginning 4. Done Select the number corresponding to a file system operation, 'Return to beginning' to change selections, or 'Done' to proceed with the install [4]: 1  Disk Name  Slice Name    Size(Mb)   c0t0d0             /             2000                  swap          514        File System operations: 1. Print the current partition table 2. Modify a disk's partition table 3. Return to beginning 4. Done Select the number corresponding to a file system operation, 'Return to beginning' to change selections, or 'Done' to proceed with the install [4]: 4  The following items will be installed: Tape  /dev/rmt/0n      0 Root  Device: c0t0d0 File  Systems:       c0t0d0s0 / 2000 MB       c0t0d0s1 swap 514 MB Enter 'y' to accept these values and start the installation, or 'n' to return to disk selection to make changes (y/n): y  Installing... Extracting archive(s) Enter 'y' to accept these values and start the installation, or 'n' to return to disk selection to make changes (y/n): y  Installing...   (Note:  The progress meter may not move during the extraction.) Extracting archive(s) |-1%--------------25%-----------------50%-----------------75%--------------100%|  ...lines deleted... Feb 18 09:19:45 rpcbind: rpcbind terminating on signal. syncing file systems... done rebooting... Resetting ...

The flash recovery is now complete. Once the system reboots, you may have to configure system information such as the node name and network information.




Backup & Recovery
Backup & Recovery: Inexpensive Backup Solutions for Open Systems
ISBN: 0596102461
EAN: 2147483647
Year: 2006
Pages: 237

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