This document details the commands for creating, verifying, and restoring a system backup in AIX Version 3.2.5. It is only applicable to version 3.2.5. This document should only be used as a supplement to the AIX System Management Guide.
The IBM AIX UNIX is different from other UNIXs for two main reasons: the object database manager (ODM) and the logical volume manager (LVM). It is because of the ODM and the LVM, as well as the ability to have multiple volume groups, that complete system archives made with cpio or tar will not restore properly. Attempting to restore such an archive on a running system can potentially crash the machine.
Creating a mksysb to a tape drive will create a bootable tape, four images on the tape, and the fourth image will contain ONLY rootvg jfs mounted file systems. The target tape drive MUST be local to create a bootable tape.
The following is a description of mksysb's four images.
+----------------------------------------------------------+ | Bosboot | Mkinsttape | Dummy TOC | rootvg | | Image | Image | Image | data | |----------------------------------------------------------| |<------------- Block size 512 ----------> | Blksz defined | | | by the device.| +----------------------------------------------------------+
IMAGE #1: The bosboot image contains a copy of the system's kernel and specific device drivers allowing the system to boot from this tape.
blocksize: 512 format: raw image files: kernel device drivers
IMAGE #2: The mkinsttape image contains files to be loaded into the RAM file system when booting in maintenance.
blocksize: 512 format: backbyname files: ./.fs.size, ./tapeblksz, ./bosinst.data and commands
IMAGE #3: The dummy image contains a single file containing the words "dummy toc". This image is used to make the mksysb contain the same number of images as a BOS Install tape.
IMAGE #4: The rootvg image contains data from the rootvg volume group (mounted jfs file systems ONLY).
blocksize: defined by SMIT device on create format: tar files: rootvg, mounted jfs file systems
Creating a mksysb to a file will create a non-bootable, tar archive containing only rootvg jfs mounted file systems.
NOTE: A mksysb tape is ONLY bootable when it is created to a local tape drive.
Fill in the correct device name to be used. Press Enter to start the backup. If more than one tape is required, SMIT will prompt you to change the tape.
smit mksysb FORCE increase of work space if needed no Backup DEVICE or FILE {/dev/rmt#} (example: /dev/rmt#)
mkszfile && mksysb /dev/rmt# 2>/tmp/mksysb.err
NOTE: A mksysb created to a file is NOT bootable.
A mksysb image file is created in the same manner as the bootable tape, described above. The only difference is shown below:
smit mksysb FORCE increase of work space if needed no Backup DEVICE or FILE {/path/file}
mkszfile && mksysb /path/file 2>/tmp/mksysb.err
The only method to verify that a system backup will correctly restore without problems is to actually restore the mksysb onto another machine. This should be done following the company's DISASTER RECOVERY PLAN.
To minimize problems due to tape media damage, the following tests can be performed.
WARNING:These tests only verify that the tape media can be read on this machine and will not guarantee that the mksysb will be restored successfully.
tctl -f /dev/rmt# rewind tctl -f /dev/rmt#.1 fsf 3 tar -tvf /dev/rmt# > /tmp/log
Let the table of contents run to completion to be sure that there are no "bad spots" on the tape.
The only way to verify that the mksysb tape will successfully boot is to bring the machine down and boot from the tape. No data needs to be restored.
WARNING: A mksysb at AIX 3.2.5 can ONLY be restored back to the original system with the exact hardware which existed on the system at the time the mksysb was created. It can be restored to the same system or a different system as long as the mksysb contains ALL device driver support for the hardware located on the target system.
NOTE: At AIX 3.2, certain information is "assumed" upon system restoration. To be sure that the target system will have enough disk space, the following information can be assumed:
Paging Space (PAGING) /dev/hd6
Paging space for the target system is calculated from the amount of RAM present on the target system. Paging is spread over all rootvg disks, and should never take more than 20% of any one physical volume.
< 64mb of ram on target system paging = ram * 2mb >=64mb of ram on target system paging = ram + 16mb Boot Logical Volume (BLV) /dev/hd5 2PP's = 8mb System Dump Device (SYSDUMP) /dev/hd7 2PP's = 8mb Rootvg JFS Log Device (JFSLOG) /dev/hd8 1PP = 4mb
NOTE: If there are volume groups other than rootvg, error messages may display prior to a login prompt. Ignore these messages unless they prevent the prompt from appearing.
NOTE: Total restore time varies from system to system. A good rule of thumb, provided the device blocksize is not set to 0, is twice the amount of time it took to create the mksysb. If the blocksize of the device is 0, expect to see a restore time of 5-10 times that it took to create the mksysb.
Execute:
lsdev -Cc disk
Execute:
importvg -y vgname hdisk#
For example, if there is another volume group named "data" and it resides on hdisk3 and hdisk4, execute:
importvg -y data hdisk3
varyonvg vgname
shutdown -Fr
NOTE: In order not to reboot the system again, the command mount -a can be used in place of shutdown. This will mount all the new file systems. However, a system reboot should be schedule as soon as possible to be sure that everything is in sync.
1) Install AIX 2) Install a system that was created with SMIT "Backup the System" or the "mksysb" command. 3) Install the system for use with a "/usr" server. 4) Start a limited function maintenance shell
1) INPUT Installation Device 2) DESTINATION Disks 3) STARTUP (Boot) Disks 0. Continue
DEVICE TYPE PATHNAME LOCATION CODE 1. 8mm Tape: /dev/rmt# 00-01-00-40 99. Return to previous menu
1) INPUT Installation Device 2) DESTINATION Disks 3) STARTUP (Boot) Disks 0. Continue
Type one or more numbers for the disk(s) to be used for installation and press Enter. The current choice is indicated by >>>. To de-select a choice, type the corresponding number and press Enter. At least one bootable disk must be selected.
NOTE: Be sure to know the disk by SCSI ID. Hdisk#'s will not be present. Selecting the wrong disk will cause data on those disks to be lost.
LOCATION CODE SIZE (MB) VOLUME GROUP ID BOOTABLE DISK 1. 00-01-00-00 320 00032471ba62a672 YES 2. 00-01-00-10 400 00032471ba62a672 YES 99. Return to previous menu
1) INPUT Installation Device 2) DESTINATION Disks 3) STARTUP (Boot) Disks 0. Continue
Type one number for the disk to be used to boot and press Enter. Be sure and choose the disk by the SCSI ID. Hdisk# will not be present.
STARTUP DISK 1. 00-01-00-00 2. 00-01-00-10
1) INPUT Installation Device 2) DESTINATION Disks 3) STARTUP (Boot) Disks 0. Continue
cd /tmp tctl -f /dev/rmt# rewind (# to be replaced by a number) chdev -l rmt# -a block_size=512 restore -s2 -xqdvf /dev/rmt#.1 ./tapeblksz cat ./tapeblksz
The output that is given will be the blocksize the tape drive was set to when the mksysb was made.
chdev -l rmt# -a block_size=[number in the ./tapeblksz file]
cd / (if the file is to be restored to its original place) tctl -f /dev/rmt# rewind tctl -f /dev/rmt#.1 fsf3 tar -xvf /dev/rmt#.1 ./dir/filename (for one file)
Or
tar -xvf /dev/rmt#.1 ./dir (for all files in directory)
lsvg lsvg -p <vgname> lsdev -Cc disk
[ Doc Ref: 90605209214756 Publish Date: Jul. 02, 1999 4FAX Ref: 7469 ]