The AIX (junior) detective: when was the last mksysb?
AnthonyEnglish 270000RKFN Comments (3) Visits (8904)
If you've worked more than 5 minutes on AIX system administration, you would have heard of the famous "mksysb". This refers to the backup named from the mksysb command, which makes a system backup. Actually, the mksysb doesn't back up your entire AIX system - just the root volume group (rootvg). You still need other backup utilities for databases and non-rootvg file systems.
And, come to think of it, the mksysb doesn't necessarily get all the files in your rootvg. If you have some file systems or files in rootvg which you want to exclude from the mksysb backup, you can do that by specifying a pattern in the file /etc/exclude.rootvg and invoking the mksysb with the -e flag. Naturally, you'll need to back them up some other way, or leave them out of your backups altogether.
The mksysb command has several options but the two most common ones are the -e flag just mentioned, and the -i flag. That one, as the mksysb command documentation explains:
The -e and -i flags can also be used when creating the mksysb via the mkcd command (in CD format) or the mkdvd command for Rock Ridge (ISO9660) or UDF (Universal Disk Format) format.
I used to delight in visiting clients and sternly asking them (wearing my thickest eyebrows) when their last mksysb backup was done. The clue was this image.data file. It provides a good indication of when the last mksysb was run, but it's not foolproof.
You could create the /image.data file without running the mksysb, just by running the mkszfile command. Or the start of the mksysb might have worked, creating a new image.data file, but then the mksysb backup failed for some other reason, such as lack of space when writing to the backup directory or device.
For that matter, you could run a mksysb backup without creating a new /image.data file, but that would have its risks. Supposing your image.data file was badly out of date. You have created some new file systems in rootvg, or maybe increased the sizes of the rootvg file systemssince the image.data was last created.. When it comes time to restore, you might find those file systems either don't exist or are too small to be able to restore the data from the backup.So it's usually best to invoke mksysb with the -i flag. The main reason you wouldn't is if you were to supply your own, modified image.data, for example so that the restore didn't require logical volume mirroring which may be in place on the source system.
The /image.data gives a clue as to when your OS last got backed up, but it's only a clue, so it's a good introduction to snooping around a new system if you're a junior AIX detective.
Backup and Restore with AIX
Installing a system backup
Customizing and using the bosinst.data file