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.
- dummy.toc
- 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 Image
mkinsttape is the second image in mksysb backup. It also uses block size of 512KB. It has 3 important files:
./tapeblksz
This contains block size on tape which was set at the time of taking backup.
./bosinst.data
This file contains customized BOS install procedure. This is used to tailor the mksysb to adjust to the target system.
./image.data
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.
dummy.toc
It contains dummy Table of Contents. It’s used so that mksysb tape will have same number of images as on BOS install tape.
rootvg Data
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:
e.g
/tmp
/usr
etc.
How To Take Backup Using mksysb
You can take mksysb backup as mentioned below:
1. Use command as below:
mksysb /dev/rmt0
2. If you want to exclude file as per specifications in /etc/exclude.rootvg
then run the command as:
mksysb -e /dev/rmt0
hi ganesh.
I am first time I seen your articles. It is very very very useful to me. Then, Lpar video is not opening in your site. kinly send that does videos.
Regards
Mahadevan.S.
This is a nice and easy post, thanks.