Restores a backup of the Network Installation Management (NIM) database to a different machine and updates the database to reflect this change.
nim_master_recover [ -f mstr_fileset_dir]
[ -n nimdef_file]
[ -r nimdb_file]
[ -i mstr_interface]
The nim_master_recover command can restore and update the NIM database from a backup tar file. To backup the NIM database on the old master, run the smit nim_backup_db command. This creates a tar file named /usr/objrepos/nimdb.backup by default. Once the nimdb.backup is copied to the new master, pass the -r flag with the full path to the file. If the path to the tar file is /usr/objrepos/nimdb.backup, then pass -r /usr/objrepos/nimdb.backup to the nim_master_recover script.
Along with restoring and updating the NIM database, the script performs several other optional functions. One is to install the bos.sysmgt.nim.master fileset if the -f flag is passed with the location of the bos.sysmgt package. For instance, if the bos.sysmgt package is located in the /export/latest/installp/ppc directory, then you would pass -f /export/latest/installp/ppc to the nim_master_recover script.
New clients can be added to the environment by specifying a nimdef file with the -n flag. Consult the AIX® Installation Guide for more information on nimdef files.
All output will be logged to /var/adm/ras/nim.recover. Once the script is complete you should verify that no errors were logged.
The nim_master_recover command behaves differently when it is called with the -N flag. This allows the master to have its hostname, IP address, and NIM network changed in its if1 attribute. Optionally, a new NIM network may be created if the -t flag is provided with the -N flag. The command should be run with these flags before the master's network name or address is actually changed so that the NIM environment will work properly once the change actually takes place. When the master's NIM attributes are changed, the command will attempt to update /.rhosts and /etc/niminfo of each standalone client defined in the environment. Any clients for which this attempt fails must have its NIM master information updated manually. Also, after a standalone client has had its NIM master's network name changed, it will not be able to execute any NIM operations until the master is up and running with its new network name.
Item | Description |
---|---|
-D | Deletes all client definitions from the restored database. |
-f directory | Directory containing the bos.sysmgt.nim.master fileset to install. |
-i interface | Primary network interface of the machine where you are running the command. |
-n nimdef | Optional nimdef file that will be used to define new machines. |
-N mstr_net_info | Changes the master's if1 attribute and attempts to update each standalone client defined in the environment with the master's new network information. The mstr_net_info variable consists of the following: "nim_net_name [hostname] [cable_type]"; where hostname and cable_type are optional. |
-p | Print the machine states before the script resets the machines. |
-r nimdb.backup | The NIM database backup tar file that will be restored. |
-R | Do not check the resources to see if each one exists. The default behavior is for the script to check each resource and if it does not exist, remove its definition from the database. |
-S | Do not check the SPOT resources. The default behavior is for the script to check every SPOT to ensure it is ready to support an install. For example, the check ensures the boot images are created. |
-s | Attempt to update the niminfo file on each client. Any NIM client that is not running, does not have a network connection, does not allow the new master rhost permissions, or does not have at least the bos.sysmgt.nim.client 5.1.0.10 package installed, will not have its niminfo updated. |
-t net_def | Creates a new NIM network if the master's IP address changes and there is no existing NIM network that could contain the master. This flag is only valid when the -N flag is also specified. The net_def variable consists of the following: "nim_net_name net_type net_addr net_snm default_route"; where net_type can be ent, tok, atm, or fddi. |
-u | Unexport all resources that are listed as allocated in the restored database. The default behavior is for the script to delete the allocation from the NIM database without attempting to deallocate the resource. |
-v | Enables verbose debug output during command execution. |
/usr/sbin/nim_master_recover
Returns zero (0) upon success.
Access Control: You must have root authority to run the nim_master_recover command.
Attention RBAC users and Trusted AIX users: This command can perform privileged operations. Only privileged users can run privileged operations. For more information about authorizations and privileges, see Privileged Command Database in Security. For a list of privileges and the authorizations associated with this command, see the lssecattr command or the getcmdattr subcommand.
nim_master_recover -r /usr/objrepos/nimdb.backup -i en0
nim_master_recover -f /export/lpp_source/installp/ppc \
-r /usr/objrepos/nimdb.backup -i en0
nim_master_recover -R -S -r /usr/objrepos/nimdb.backup -i en0
nim_master_recover -u -p -r /usr/objrepos/nimdb.backup -i en0
nim_master_recover -s -r /usr/objrepos/nimdb.backup -i en0
nim_master_recover -D -n /export/nim/nimdef -r /usr/objrepos/nimdb.backup -i en0
nim_master_recover -N "net2 newhost.domain.com"
nim_master_recover -N "new_nim_net newhost.domain.com bnc" \
-t "new_nim_net ent 192.168.1.0 255.255.255.0 192.168.1.1"
Item | Description |
---|---|
/etc/niminfo | Contains variables used by NIM. |
/var/adm/ras/nim.recover | Contains log information from command execution. |