Recovering AIX from a backup
Storix is a commercial product that provides a backup and recovery solution for AIX. This article is not a review of the product, but rather how to take a backup and then recover AIX. Storix offers a 30-day download trial period of the stand-alone product for you to test. The download trial is what I am using for this demonstration. See the Related topics section for the download site.
Storix allows you to backup or restore:
- Volume groups (including rootvg)
- Adhoc files
It also offers encryption (in the full version).
I have used Storix for quite a few years, for backup and recovery, so I can tell you from experience that it works. It recovers your AIX box, and you can tailor the process on what gets restored during that recovery process. For example, perhaps you do not want to restore certain file-systems when restoring your rootvg or other volume groups, or perhaps you do not want two copies of an LV restored.
With the commercial product, the default set-up is to have a server-to-client mechanism where the clients are backed up to the server either to the disk, typically a SAN file-system, or to a tape library. You can also create boot images from the client which are then transferred to the server. This method is especially useful when you have AIX boxes on different versions, and you require different boot images for different AIX versions for recovery.
Network restore overview
Storix is typically used to backup and recover AIX boxes, and this means rootvg. Other non-rootvg volume groups can be backed up via Storix or, more typically, via your own backup application.
To recover AIX over a network, as this method is so much more convenient when your AIX boxes are geographically dispersed (not just in different buildings but also in different countries), you would have:
- Previously generated a boot image of the client to the server; this can also be via a writeable CD /DVD.
- Previously taken a volume group backup of rootvg.
Now to restore, you would:
- Boot up the client (to be recovered) into SMS, go into IP menu and select a network card that is cabled into the switch and on the network.
- Enter the client IP.
- Enter the gateway IP, so it can ping the Storix server.
- Enter the Storix server IP.
Next, check that you can ping the Storix server. If all OK, then you can proceed. If not, you'll need to fix it.
On the Storix server:
- Enable network install to that server by selecting the boot image taken from that client.
- When prompted, enter the client IP.
- Enter the gateway IP.
- Enable remote install.
On the client AIX box, boot-up off the network card where the IP details were previously entered.
Boot-up starts and Storix connects to it. Upon loading the boot image, choose the backup job from the Storix menu on the client you want restored.
If you are restoring to a different machine from where the client backup was taken, then the network interface stays down when AIX recovers. If you are restoring back to the original client from when the backup image was taken, then the network interface will come up.
In the above scenario, I have outlined the procedures to restore across a network. Now, let's do a backup and restore of an AIX box.
Unpack and configure
For the this demonstration, I take you through how to backup and recover
your AIX box using a local tape device. If you have do so, install Storix.
In this demonstration, the download file is
Once downloaded, untar and run the following command:
# tar - xvf storix_aix_risc.tar # ./stinstall
Accept the defaults for the file-system creation, port numbers, and SSL certificates. You will be prompted to enter a user name and password to access the web interface. Once installed, we are now ready to configure our backup device and backup job.
Using your favourite browser, point it to the following:
Using my host called rs6000, I would use: https://rs6000:8080/.
Now, login using your previously given credentials.
Creating a backup job and image
- From the Storix interface top menu, select Configure and then Backup Devices.
- Select the backup device.
Typically (for a stand-alone client) this would be an attached tape. Enter a meaningful name; this is an alias for storix to use. In this demonstration, I am using a locally attached tape unit.
- From the top menu select Sbadmin and then Backup Settings.
- Select expiry. Enter the overwrite options for your backup device and whether to eject after a backup, or have Storix append to a previous backup image. Thus, making sure you do not overwrite the current images on the tape.
- Select General Preferences from the Sbadmin menu. Enter your preferences on dealing with warnings or errors (they can either go to a file, or you can provide an email address).
To create a backup job to backup rootvg on the local host:
- From the top menu, select Configure -> Backup jobs -> Add.
- Fill in the backup fields.
- Select the type of backup:
- System save
- Backup device (this was what was previously configured as your backup device)
- Data to backup should be rootvg.
- Full system save
- Backup device (this was what was previously configured as your backup device).
- Data to backup should be rootvg.
In this example, I am selecting:
- Profile name is Volume Group backup.
- The job id I will give it will be called rootvg.
- Volume group name to include will be rootvg
- Backup device: tape or whatever backup device you have configured on your AIX box.
That concludes the basic information Storix needs; save this information. You can also set-up a schedule here, if you wish to run a backup at a different time.
To run the job: rootvg
- From the top menu select Actions.
- Then select Run backup jobs.
- Highlight the backup job you just created, rootvg in this demonstration.
- Select rootvg to run now.
Figure 1 shows the backup job rootvg running.
Figure 1. Storix system backup
To monitor the actual backup process, select Show output of running jobs from this page.
The screen shot shown in Figure 2 displays how far the backup has progressed. It also gives an approximate finish time. Once completed, you will then have a bootable AIX tape containing rootvg.
Figure 2. Backup monitor
That concludes the process of creating a bootable tape.
Restoring the image
Now that the backup image is on tape, the next task is to boot AIX into the SMS and boot off that tape. Figure 3 below displays an AIX box booting up. Enter the number '1' key to go into SMS. Once in SMS, select the boot device that has the Storix backup. In this demonstration, it is a tape device.
Figure 3. SMS boot
Boot the device that has the Storix backup; the Storix welcome screen, as seen in Figure 4, displays.
Figure 4. Storix welcome screen
When prompted, select the system console as shown below in Figure 5.
Figure 5. System console
Next, select the terminal type to navigate the menus. Typically this would be vt100 for a tty or vty terminal. The main Storix menu, as shown below in Figure 6, displays. From the main menu, you can change the install server or device. If you have more than one Storix backup image on tape, then you can forward the tape to select the required image. The logical volume and file-systems contained in each backup image are displayed on the screen from each selected image. The option to change the logical volume or file-system setting is where most of your attention will be as this is where you can change the restore settings.
Figure 6. Storix menu
One of the key tasks that needs to be carried out is to select the disks on which to restore rootvg. Selecting the menu option as just described, select the disks on which to create rootvg. This is ultimately where the image will be restored. As shown in Figure 7, it has detected that the backup image I took also knows about a volume group call apps_vg. Though Storix knows about the volume group via the ODM, it has not backed it up. I need to inform Storix to exclude this volume group anyway by selecting an 'x' to exclude it from the restore. I will import it once the system is recovered. So inform Storix to exclude this volume group, as shown below in Figure 7.
Figure 7. Volume group
Once Storix has all the volume group information, that is the disk(s) to restore rootvg on and any other volume group actions, continue and save this information.
There are occasions when perhaps due to disk space, for example, you only have one disk to restore to. You may need to amend what logical volumes gets restored from rootvg. Within Storix, you can select to only restore one copy of a logical volume, or reduce the size of the logical volume, or just exclude the logical volume / file-system from being restored. Figure 8 below shows the current list of logical volumes and file-systems. By selecting an LV from the list, a new screen displays.
Figure 8. Change LV
Once the LV is selected, you can change these attributes of the logical volume as just described. If you are fighting for space to restore the rootvg, the amount of space required for the restore is shown on the top right of the screen. Figure 9 shows the LV settings screen.
Figure 9. Customise LV
Once you are happy with your changes, use the Esc key to exit to the top level menu and select Install system with current settings.
Storix does a consistency check on space requirements. If all is OK, you can proceed with the install. If there are issues, Storix tries to fix it, but prompts you to ensure that this is what you want. If Storix cannot fix it, then you need to resolve this yourself. Typically this means reducing the image that gets restored, like excluding or reducing file-system sizes.
If all is OK, proceed with the restore and select 'y'. Storix starts the restore process. Figure 10 below shows the AIX restore in progress.
Figure 10. Restore
Once the restore has completed, it reboots. Be sure to check and start-up any async I/O once you are logged in. If this restore is done to a new hardware box, then you need to bring up the network interfaces.
Backing from the command line
You can also backup and restore from the command line. The following script does a stand-alone backup to the local tape device rmt0. The backup command allows you to exclude certain file-systems. In the following backup script contained in Listing 1, the following mounted file-systems will be excluded:
/opt/dump/ /usr/local /opt/webpshere/logs /tmp /var
Upon completion, it send an email out to the sysadmins email user list.
Listing 1. Listing 1. Backup
# !/bin/sh # backup_st log=/tmp/stlog > $log /usr/bin/stbackup -tF -d rmt0 -b1024 -O -e all \ -/opt/dump -/usr/local -/opt/websphere/logs -/tmp -/var >>$log if [ $? != 0 ] then cat $log | mail -s "'hostname' storix backup - failure" "sysadmins" exit 1 else cat $log | mail -s "'hostname' storix backup - success" "sysadmins" fi
In the above script, the following options are used:
|tF||This is of type a (F) file-system backup|
|d||Specifies the tape device to use|
|b1024||The buffer size to use|
|O||Overwrite any exiting storix backup image on tape|
|e||Ejects the tape after backup|
|all||Include all on-line volume groups|
|-||prefix each file-system to ignore|
Storix is a valuable product to have for normal system backups or full recovery, be it at local or remote locations.
- Go to Storix.com
- Get more information about AIX.
- Try out IBM software for free. Download a trial version, log into an online trial, work with a product in a sandbox environment, or access it through the cloud. Choose from over 100 IBM product trials.