What is mksysb
mksysb is a command to create backup of rootvg on AIX systems.Â It creates bootable image of all the filesystems mounted at the time of taking mksysb backup. And backup created is called mksysb backup. Ultimately we can use this backup to restore the exact image of the system which it had at the time of taking backup.
Important Ideas About mksysb
1. mksysb Does Not Backup Everything
mksysb does not backup everything on the system. Any user defined paging spaces and raw devices are not backed up.
2. mksysb Image Is Bootable Only If Taken On Tape
mksysb image is only bootable if its taken on some device like tape. If it’s stored as file then it won’t be a bootable image.
Components of mksysb
mksysb has 4 important components:
- BOS boot image.
- mkinsttape image.
- rootvg data
These are explained briefly one by one.
BOS Boot Image
This is the first image in mksysb backup. BOS is Base Operating System. It contains kernel device drivers. Its used to boot the system from mksysb image. It uses block size of 512 KB.
mkinsttape is the second image in mksysb backup. It also uses block size of 512KB. It has 3 important files:
This contains block size on tape which was set at the time of taking backup.
This file contains customized BOS install procedure. This is used to tailor the mksysb to adjust to the target system.
This file has the information regarding sizes, names, maps and mount points of logical volumes(LVs). This file can also be customized using mkszfile command. It can be used to exclude certain files and directories from mksysb backup.
It contains dummy Table of Contents. It’s used so that mksysb tape will have same number of images as on BOS install tape.
This has all of the data of rootvg. Whatever filesystems are mounted at the time of mksysb image, will be backed up.
Can We Exclude Some File From Backup
Yes. Simply create a file as /etc/exclude.rootvg.
In this file you can list absolute paths of files and directories to be excluded, one per line:
How To Take Backup Using mksysb
You can take mksysb backup as mentioned below:
1. Use command as below:
2. If you want to exclude file as per specifications in /etc/exclude.rootvg
then run the command as:
mksysb -e /dev/rmt0