Using backupios

Edit: Some links no longer work.

Originally posted October 18, 2011 on AIXchange

In a recent AIXchange blog entry I discussed using the viosbr command to backup VIO server settings. Now I’ll tell you about backupios. Both commands should be used in your VIOS environment.

While viobr allows you to restore mappings, backupios is used to restore the whole VIOS operating system. So think of backupios as your VIOS’s mksysb:

“[backupios] creates an installable image of the root volume group, either onto a bootable tape, file system or DVD.

“The backupios command creates a backup of the Virtual I/O server and places it onto a file system, bootable tape or DVD. You can use this backup to reinstall a system to its original state after it has been corrupted. If you create the backup on tape, the tape is bootable and includes the installation programs needed to install from the backup.

“If the -cd flag is specified, the backupios command creates a system backup image to DVD-RAM media. If you need to create multi-volume discs because the image does not fit on one disc, the backupios command gives instructions for disk replacement and removal until all the volumes have been created.

“(Note: Vendor disc drives may support burning to additional disc types, such as CD-RW and DVD-R. Refer to the documentation for your drive to determine which disc types are supported.)

“If the -file flag is specified, the backupios command creates a system backup image to the path specified. The file system must be mounted and writable by the Virtual I/O Server root user prior to running the backupios command (see mount command for details). Backing up the Virtual I/O Server to a remote file system will create the nim_resources.tar image in the directory you specify. The Virtual I/O Server must have root write access to the server on which the backup will be created. This backup can be reinstalled from the HMC using the installios command.

“The backupios command empties the target_disks_stanza section of bosinst.data (which is part of the nim_resources.tar image) and sets RECOVER_DEVICES=Default. This allows the mksysb file generated by the command to be cloned to another logical partition. If you plan to use the nim_resources.tar image to install to a specific disk, then you need to repopulate the target_disks_stanza section of bosinst.data and replace this file in the nim_resources.tar image. All other parts of the nim_resources.tar image must remain unchanged.”

When I take backups, I typically think in terms of having access to a NIM server in my environment, so I’m just interested in the VIOS mksysb. I like to run:

backupios -file vio.mksysb -mksysb –nomedialib

Using the –nomedialib flag means I exclude the media library, so I’m not backing up all of those .iso images that hang around in my VIOS’s /var/vio/VMLibrary filesystem. Of course, it’s pointless to waste that space on a bunch of CD images (.iso files), since they’re generally simple to recreate if need be. (Of course there are exceptions, so by all means backup any images that are NOT easily recreated.)

Again, be sure to backup your VIOS environment with both viobr and backupios. Together, they give you the tools you need should something go wrong.