AIX mksysb script

  • The following script is scheduled to run weekly on the NIM server to take “mksysb” backups of each of the AIX LPARS.
/opt/support/mksysb/mksysb_to_nim_run.ksh
  • The script reads a file containing a list of the LPARs to be backed up and for each entry performs the following actions using SSH:
1. Cycle the log file.
2. Create the "/export/nim/mksysb" directory on the client LPAR if it does not exist.
3. Mount NIM's "/export/nim/mksysb" on the client LPAR at the "/export/nim/mksysb" mount point.
4. Run the /export/nim/mksysb/scripts/AIXinfo script to collect AIX system info for DR.
5. Run the /export/nim/mksysb/scripts/skelvg script to collect non-rootvg volume group info for DR.
6. Run the "mksysb"
7. Unmount "/export/nim/mksysb" from the client.
8. When all clients have been processed an e-mail is sent to addresses specified in the script showing the return code from each mksysb.
  • The script can be invoked with up to two options:
"-i instance_id"		Instance ID used in generated file names and client_list names, default is 1
"-f client_list_file_name"	File name of a file containing the client list

Files used by the script

  • All of the following files are on the NIM server:
  • The following files contain the list of lpars to be backed up, each host must have an entry in “/etc/hosts” on NIM with the backup network address assigned (this is the default):
/opt/support/mksysb/mksysb1/mksysb1_to_nim_run.txt		(for instance ID 1)
/opt/support/mksysb/mksysb2/mksysb2_to_nim_run.txt		(for instance ID 2)
  • Client lists can be created from the lists produced by the lparlist script which runs on Mondays on b0045nim.
  • Messages etc are output to the following log file of which 5 backup generations are kept.
/opt/support/mksysb/mksysb1/mksysb1_to_nim_run.log		(for instance ID 1)
/opt/support/mksysb/mksysb2/mksysb2_to_nim_run.log		(for instance ID 2)
  • Mksysb images are written to the following filesystem on the NIM server:
/export/nim/mksysb
  • To facilitate reruns of failed mksysb's the client list file can be overriden by passing the -f option followed by a file name e.g:
/opt/support/mksysb/mksysb_to_nim_run.ksh  -f /opt/support/mksysb/mksysb2/mksysb2_to_nim_Rerun.txt  -i 2
  • The client must also be added to /etc/exports for the /export/nim/mksysb share.
 
aix/aix_mksysb_script.txt · Last modified: 06/04/2022 00:04 by andrew