Sunday, February 9, 2020

How to restore the operating system using backup in aix?

How to restore the operating system using backup in aix?

Logon to NIM server
====================
uname -a
cd /export/mksysbs
ls -l testserver.mksysb (find the mksysb which is required for the restore)


check the machine is already defined, if not define the, machine newly
=======================================================================

lsnim -l testserver
follow if the machine is not defined
smitty nim •> Perform the nim administration tasks-> Manage Machines -> Define a Machine -> give the hostne of the client machine and press enter
lsnim -l testserver


Define the mksysb resource like below.
=======================================

smitty nim_mkres —> define resource -> mksysb -> Resource name, Resource type, server of resource, location of resource.
lsnim -l testserver_res_mksysb  
(or)
nim -o define —t 'mksysb' —a server=master -a location—/export/mksysbs/testserver.mksysb/ testserver_res_mksysb 

Note: testserver_res_mksysb is the mksysb resource of the server.


Allocate spot and mksysb to the client and go for the bos_inst
==============================================================

nim -o allocate -a mksysb=testserver_res_mksysb -a spot=a1x61_T109_SP1O_spot testserver
nim -o bos_inst —a source=mksysb -a accept_licenses—yes -a boot_client=no testserver
(or)
nim -o allocate -a spot=a1x61_T109_SP1O_spot -a mksysb=testserver_res_mksysb testserver
nim -o bos_inst —a source=mksysb -a accept_licenses—yes -a boot_client=no testserver


Now logon to the sms menu from the HMC
=======================================

chsysstate -r ipar -m <frame_name> -o on -f Normal -b sms -n <testserver_name>

2 - Remote IPL
2 - Interpartition logical Lun
1 IPv4 - Address Format
1 Bootp
1 - IP parametecs (need to fill it up client Ip. server Ip, gateway ip, subnet mask)
press escape
3 - ping test
1 - Execute ping test (check the ping test success, now press enter)
M - return to main menu
5 - select boot option
1 - Select Install/Boot Device
6 - Network
1 - Bootp
2 - Interpartition Logical LAN 
2 - Normal mode moot
1 - yes
1 - 1 type and press 1 enter to have English during Install
2 - change/show Installation Settings and Install
1 - Disk(s) where you want to install hdiskO
77 - Display more Disk Information
77 — gisplay wore Disk Information
select the correct disk [ 1 - hdiskO ]
>>> choice [O]: 3 Import user volume Groups (changed to YES) (remember 3 import user volume Groups and 4 recover Devices should be in YEs)
>>> 0 Install with the settings listed above

After restoration done, you will get a login prompt

uname-a
oslevel -s
lspv
lsvq -a
df -gt
lppchk -vm3


Post restoration work
======================
logon to the nim server and remove the mksysb resource
nm —a remove testserver_res_mksysb
(or)
smltty nim_rmmac •> select the correct mksysb —> and remove system backup image=yes (CLICK ENTER)


Deallocate all the allocated resources and reset the NIM client on the NIM server
========================================================================
nim -o deallocate -F -a subclass=all testserver
nim -o reset -a force=yes testserver