[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Installation Guide and Reference

Creating System Backups

This section describes how to create and verify a bootable backup copy, or mksysb image, of your root volume group and how to make separate backup copies of user volume groups.

The root volume group is a hard disk or group of disks that contains:

A user volume group, also called the nonroot volume group, typically contains data files and application software.

A system backup does the following:

A backup transfers the following configurations from the source system to the target system:

Using the Web-based System Manager or the SMIT backup menu lets you preserve configuration information, thus avoiding some of the configuring tasks normally required after restoring a system backup. A backup preserves the configuration if the following are true:

The Web-based System Manager and SMIT both use the mksysb command to create a backup image, stored either on CD, DVD, tape, or in a file. If you choose CD, DVD, or tape, the backup program by default writes a boot image, which makes the medium suitable for installing. For more information, see System Backup to CD-R, DVD-R, or DVD-RAM.

Install All Device and Kernel Support Before the Backup is Created

In AIX 5.2, all devices and kernels are installed by default when performing a base operating system installation. This allows you to be able to create a system backup that contains all devices and kernel types. Since the system backup contains all the devices and kernel support, the system backup can be used to install another system without the need for the AIX product media. This option is available in the Install Options menu in the BOS installation menus as follows:

 Enable System Backups to install any system...................... Yes
 (Installs all devices and kernels)                                   

If you change the default (yes) to no, then only the devices and kernel type for your system configuration will be installed.

This value is read from the ALL_DEVICES_KERNELS field in the /var/adm/ras/bosinst.data file on the product media you used to boot the system.

After the system is installed, you can check if all the devices and kernel types have been installed on the system as follows:

# grep ALL_DEVICES_KERNELS bosinst.data  

Output similar to the following displays:

    ALL_DEVICES_KERNELS = yes

Refer to Customized BOS Installations for more information about the bosinst.data file.

Prerequisites for Creating Backups

Before creating system backups, complete the following prerequisites:

Creating a Root Volume Group Backup to Tape or File

You can use either the Web-based System Manager or SMIT to create a system backup. These backups can be stored to CD, DVD, tape, or in a file.

For instructions on how to backup to CD/DVD, see System Backup to CD-R, DVD-R, or DVD-RAM.

To create a root volume group backup:

You have created the backup of your root volume group (rootvg). If you created bootable tapes, you can use these tapes to start your system if for some reason you cannot boot from hard disks.

System Backup to CD-R, DVD-R, or DVD-RAM

Creating a backup on CD-R, DVD-R, or DVD-RAM media is similar to making a backup tape for your personal use, but with some noticeable differences. For DVD media, the following formats for creating backups are available:

Note: For information about CD-R, DVD-R, or DVD-RAM drives and CD-R, DVD-R, or DVD-RAM creation software, refer to the following readme file:

/usr/lpp/bos.sysmgt/mkcd.README.txt

Both Web-based System Manager and SMIT use the mkcd command, which calls the mksysb or savevg command, if needed.

For system backups, the CDs or DVDs can be created as:

In AIX 5.2, a bootable system backup contains the chrp boot image and all the device and kernel packages necessary to install a system. A backup CD or DVD can be used to install (clone) a large number of machines, which is convenient when each machine in the system environment needs to have the same image installed.

Note
It is possible that a backup CD or DVD would not boot all machines of the same type because not every machine has the same hardware configuration. Depending on what packages were made available during the creation of the backup, the backup might not have all the necessary packages to boot an individual system. Most required packages for systems are present on the BOS AIX 5.2 media.

Web-based System Manager and SMIT interfaces are available for the mkcd command. Online help can guide you through the required steps.

Hardware and Software Requirements

The mkcd command requires that you already have the software installed to create a CD/DVD file system in Rock Ridge format and to burn or write the CD/DVD. The GNU versions of cdrecord and mkisofs are installed with a BOS installation. Hardware and software that has been tested with this command includes the following:

Software Hardware
GNU and Free Software Foundation, Inc.

readcd version 1.9
mkisofs version 1.13

Matsushita LF-D291 DVD-RAM

Using the mkcd Command

To run the mkcd command, you need extra working space. A separate file system or directory is required for each of the following:

The mkcd command creates the following file systems if they are not already present or if alternative file systems or directories have not been specified:

/mkcd/mksysb_image
Space requirement depends on the size of the mksysb image that is to be created. The mkcd process attempts to calculate this space and verify that adequate space is available before starting to create the mksysb image.
Note
When mkcd calculates the space requirements needed for the /mkcd/mksysb_image directory, it also adds the space used by the excluded files (/etc/exclude.rootvg). It is therefore possible that the mkcd command might not be able to create the /mkcd/mksysb_image directory.
/mkcd/cd_fs
Requires 645 megabytes (up to 4.38 GB for DVD)
/mkcd/cd_images
Requires at least 645 megabytes (up to 4.38 GB for DVD) of space. If the -R or -S flags are used to specify not removing the images and there are multiple volumes required, more space must be provided.

The space used in these file systems is only temporary (unless the -R or -S flag is specified to save the images). If the mkcd command creates the file systems, it also removes them. Each file system or directory might require over 645 megabytes (up to 4.38 GB for DVD).

If your machine does not have sufficient space, you can use NFS to mount some space from another server system; however, the file systems must be writable. You can create a /mkcd file system that is very large (1.5 GB for CD or 9 GB for DVDs). The /mkcd file system can then be mounted onto the clients when they want to create a backup CD or DVD for their systems. When creating very large backups (larger than 2 GB) with the mkcd command, the file system must be large-file enabled and the ulimit values must be set to unlimited.

The mkcd command with the -L flag allows the creation of ISO9660 DVD-sized images. The mkcd command with the -U flag allows the creation of UDF DVD images.

Creating a Root Volume Group Backup on CD or DVD with the ISO9660 Format

The SMIT procedure is similar for CD and ISO9660 DVD.

  1. Type the smit mkcd fast path. The system asks whether you are using an existing mksysb image.
  2. Type the name of the CD-R device. (This can be left blank if the Create the CD now? field is set to no.)
  3. If you are creating a mksysb image, select yes or no for the mksysb creation options, Create map files? and Exclude files?. Verify the selections, or change as appropriate.

    The mkcd command always calls the mksysb command with the flags to extend /tmp.

    You can specify an existing image.data file or supply a user-defined image.data file. See step 16.

  4. Enter the file system in which to store the mksysb image. This can be a file system you created in the rootvg, in another volume group, or in NFS-mounted file systems with read-write access. If this field is left blank, the mkcd command creates the file system, if the file system does not exist, and removes it when the command completes.
  5. Enter the file systems in which to store the CD or DVD file structure and final CD or DVD images. These can be file systems you created in the rootvg, in another volume group, or in NFS-mounted file systems. If these fields are left blank, the mkcd command creates these file systems, and removes them when the command completes, unless you specify differently in later steps in this procedure.
  6. If you did not enter any information in the file systems' fields, you can select to have the mkcd command either create these file systems in the rootvg, or in another volume group. If the default of rootvg is chosen and a mksysb image is being created, the mkcd command adds the file systems to the exclude file and calls the mksysb command with the -e exclude files option.
  7. In the Do you want the CD or DVD to be bootable? field, select yesto have a boor image created on the CD or DVD. If you select no, you must boot from a product CD at the same version/release/maintenance level, and then select to install the system backup from the system backup CD.
  8. If you change the Remove final images after creating CD? field to no, then the file system for the CD images (that you specified earlier in this procedure) remains after the CD has been recorded.
  9. If you change the Create the CD now? field to no, the file system for the CD images (that you specified earlier in this procedure) remains. The settings you selected in this procedure remain valid, but the CD is not created at this time.
  10. If you intend to use an Install bundle file, type the full path name to the bundle file. The mkcd command copies the file into the CD file system. You must have the bundle file already specified in the BUNDLES field, either in the bosinst.data file of the mksysb image or in a user-specified bosinst.data file. When this option is used to have the bundle file placed on the CD, the location in the BUNDLES field of the bosinst.data file must be as follows:

    /../usr/sys/inst.data/user_bundles/bundle_file_name
  11. To place additional packages on the CD or DVD by entering the name of the file that contains the packages list in the File with list of packages to copy to CD field. The format of this file is one package name per line.

    If you are planning to install one or more bundles after the mksysb image is restored, follow the directions in the previous step to specify the bundle file. You can thenuse this option to have packages listed in the bundle available on the CD. If this option is used, you must also specify the location of installation images in the next step.

  12. Enter the location of installation images that are to be copied to the CD file system (if any) in the Location of packages to copy to CD field. This field is required if additional packages are to be placed on the CD (see the previous step). The location can be a directory or CD device.
  13. You can specify the full path name to a customization script in the Customization script field. If given, the mkcd command copies the script to the CD file system. You must have the CUSTOMIZATION_FILE field already set in the bosinst.data file in the mksysb image or else use a user-specified bosinst.data file with the CUSTOMIZATION_FILE field set. The mkcd command copies this file to the RAM file system. Therefore, the path in the CUSTOMIZATION_FILE field must be as follows:

    /../filename
  14. You can use your own bosinst.data file, rather than the one in the mksysb image, by typing the full path name of your bosinst.data file in the User supplied bosinst.data file field.
  15. To turn on debugging for the mkcd command, set Debug output? to yes. The debug output goes to the smit.log.
  16. You can use your own image.data file, rather than the image.data file in the mksysb image, by typing the full path name of your image.data file for the User supplied image.data file field.

DVD-RAM and Universal Disk Format

This section provides information on the Universal Disk Format (UDF) and how to create system backups using DVD-RAM media and UDF.

UDF allows you to manipulate files directly on the DVD-RAM media. The system backup image is an archived file composed of many files that can not be manipulated. However, the installation packages and any files that are not contained in the backup image, can be directly manipulated on the DVD-RAM. After the DVD is mounted the files can be changed by using an editor or new files can be copied to the DVD using the various copy and restore commands (cp, mv, restore, and such).

With UDF and DVD-RAM, system space is only needed for the backup image. A high-level description of the UDF backup process is as follows:

  1. Create a backup of a volume group to a file (archive) on a hard disk containing enough space to hold the backup image.
  2. Populate UDF with files needed to boot and install a system.
  3. Copy backup to DVD-RAM media.

The mkcd command with the -U flag is used to create a UDF file system on the DVD-RAM.

As mentioned above, UDF allows for the possibility of changing files directly on the DVD-RAM media, such as a bosinst.data file and image.data or vgname.data file. Without UDF for example, in order to add a user-defined bosinst.data file to a backup image, you had to restore the backup image to a location, add the file, and then back up the files again.

Or, you had to create a supplemental diskette containing the changed bosinst.data file, and use the supplemental diskette in conjunction with the backup. However, some system configurations may ship without diskette drives, making this procedure more difficult.

Creating a Root Volume Group Backup on DVD-RAM with Universal Disk Format

To create a root volume group backup on DVD-RAM with UDF you can do the following:

User Volume Group Backup

The savevg command provides the ability to create a user volume group backup to a CD, DVD, tape, or file. The savevg command finds and backs up all files belonging to a specified volume group. The volume group must be varied-on, and the file systems must be mounted.

This user backup has a copy of a non-rootvg volume group on it, and is useful for volume groups that contain user data.

The savevg command uses a data file created by the mkvgdata command. The data file created is as follows:

/tmp/vgdata/vgname/vgname.data

The vgname.data file contains information about a user volume group. The savevg command uses this file to create a backup image that can be used by the restvg command to remake the user volume group.

You can also use the mkcd command to create a user volume group backup to CD or DVD. The mkcd command currently supports saving one volume group at a time to a CD or DVD.

The mkcd command with the -L flag allows the creation of ISO9660 DVD sized images. The mkcd command with the -U flag allows the creation of UDF DVD images.

If your rootvg image and savevg image are small enough to fit on one CD, you can save them both by taking advantage of the -l (stacklist) and -z (customization_script) flags. The -l flag gives a list of images to copy to the CD. The -z flag lets you create a script to restore savevg backups. For example, if you make a copy of a non-rootvg volume group ahead of time, and then write a script that calls the restvg command, then your non-rootvg would be restored to hdisk2 at the end of the installation of rootvg, as shown by the following command:

restvg -d /SPOT/installp/ppc/savevg_image hdisk2

This procedure is recommended only if you know you want to restore the non-rootvg volume group every time you install. Otherwise, you might just want to store it on the CD/DVD, then use restvg to restore it after reboot. The restvg command can restore from CD or DVD if the name of the image is savevg_image. If you save the non-rootvg backup on a CD or DVD with a different filename, you can insert that CD or DVD and use the full path to the filename as the device for the restvg command.

Use either Web-based System Manager or SMIT to back up user volume groups to CD or DVD.

Creating a User Volume Group Backup Using Web-based System Manager

Use Web-based System Manager and select System backup wizard method. You can create a non-bootable CD or DVD that contains only a volume group backup image of a user volume group.

Creating a User Volume Group Backup Using SMIT

  1. To back up a user volume group to tape or file using SMIT, type smit savevg on the command line. Back up a user volume group to CD by typing smit savevgcd on the command line. Back up a user volume group to DVD by typing smit savevgdvd on the command line.
  2. When the Save a Volume Group screen displays, use the steps for backing up the root volume group as a guide for backing up user volume groups. There is one exception to this procedure. If you want to exclude files in a user volume group from the backup image, create a file named /etc/exclude.volume_group_name, where volume_group_name is the name of the volume group you want to backup.
  3. If you exclude files, edit the /etc/exclude.volume_group_name file and enter the patterns of file names that you do not want included in your backup image. The patterns in this file are input to the pattern-matching conventions of the grep command to determine which files are excluded from the back up.

Backup Options

Once you have a system backup or a user volume group backup, you may want to verify the backup or list information about the backup image. This section provides information on the options you can perform on a backup image. The commands used to perform these operations are the lsmksysb command for system backups, and the lssavevg command for user volume groups. This section includes information on the following topics:

Preview Information About a Backup

The preview option allows you to view volume group information, the date and time the backup was made, and the level of AIX.

You can use the lsmksysb command or the lssavevg command with the -l option to preview a backup image. For example, to preview a system backup file called /tmp/mybackup, type the following:

# lsmksysb -l -f /tmp/mybackup

The output similar to the following displays:

VOLUME GROUP:           rootvg                                              
BACKUP DATE/TIME:       Mon Jul 29 22:03:27 CDT 2002                        
UNAME INFO:             AIX va08 2 5 000974AF4C00                           
BACKUP OSLEVEL:         5.2.0.0                                             
none                                                                        
MAINTENANCE LEVEL:      none                                                
BACKUP SIZE (MB):       1408                                                
SHRINK SIZE (MB):       1242                                                
                                                                            
rootvg:                                                                     
LV NAME             TYPE       LPs   PPs   PVs  LV STATE      MOUNT POINT   
hd5                 boot       1     1     1    closed/syncd  N/A           
hd6                 paging     16    16    1    open/syncd    N/A           
hd8                 jfs2log    1     1     1    open/syncd    N/A           
hd4                 jfs2       1     1     1    open/syncd    /             
hd2                 jfs2       21    21    1    open/syncd    /usr          
hd9var              jfs2       1     1     1    open/syncd    /var          
hd3                 jfs2       1     1     1    open/syncd    /tmp          
hd1                 jfs2       1     1     1    open/syncd    /home         
hd10opt             jfs2       1     1     1    open/syncd    /opt          
fslv00              jfs2       31    31    1    open/syncd    /export/nim   
fslv01              jfs2       1     1     1    open/syncd    /tftpboot     

To preview a backup image in the SMIT, use the lsbackupinfo fast path.

Verifying a System Backup

To list the contents of a mksysb image on tape or CD, you can use either Web-based System Manager (type wsm on the command line, then choose the Backup and Restore application) or SMIT (type smit lsmksysb on the command line). The listing verifies most of the information on the tape or CD, but does not verify that the backup media can be booted for installations. The only way to verify that the boot image(s) on a mksysb tape or CD function properly is by booting from the media.

View the Backup Log

You can view the backup log that is created each time a volume group is backed up. The log file contains information on previous volume group and system backups.

You can use the lsmksysb command or the lssavevg command with the -B option to view the backup log file. For example, to view the backup log file, type the following:

# lsmksysb -B

Output similar to the following displays:

#Device;Command;Date;Shrink Size;Full Size;Maintenance Level                    
/export/mksysb/generic_sysb;"mksysb -X -e /export/mksysb/generic_sysb";M
on Jul 29 22:11:17 CDT 2002;1242;1408;                                          
/export/mksysb/generic_sysb;"mksysb -X -e /export/mksysb/generic_sys
b";Tue Jul 30 16:38:31 CDT 2002;2458;2720;                                      

To view the backup log in the SMIT, select View the Backup Log in the System Backup Manager menu.

List Information About Filesets in a System Image

You can view the filesets installed in a system backup using the lsmksysb command with the -L option. For example, to view the filesets installed in a system backup, type the following:

# lsmksysb -L -f generic_sysb

Output similar to the following displays:

Fileset                      Level  State      Description                   
---------------------------------------------------------------------------- 
Path: /usr/lib/objrepos                                                      
IMNSearch.bld.DBCS         2.4.0.0  COMMITTED  NetQuestion DBCS Buildtime    
Modules                                                                      
.
.
.
bos.terminfo.wyse.data     5.2.0.0  COMMITTED  Wyse Terminal Definitions     
bos.txt.spell.data         5.2.0.0  COMMITTED  Writer's Tools Data           
bos.txt.tfs.data           5.2.0.0  COMMITTED  Text Formatting Services Data 

To view the filesets installed in a system backup in SMIT, use the lslppbackup fast path.

List Files in a System Image

You can list all the files and file sizes in a backup using the lsmksysb command or the lssavevg command. For example, to view the files and file sizes in a system backup, type the following:

# lsmksysb -f generic_sysb

Output similar to the following displays:

.
.
.
      353218 ./smit.log               
         252 ./smit.script            
           0 ./tftpboot               
           0 ./tmp                    
           5 ./u                      
          21 ./unix                   
The total size is 629313078 bytes.    

To view the files and file sizes in a system backup in SMIT, use the lsmksysb fast path.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]