Saturday, 6 April 2013

Restoring autoconfig configurations (How does autoconfig restore.sh script work)



Each time autoconfig is run it creates a folder under [inst_top]/admin/out/. The name of folder is the the date and time of autoconfig run in the mmddhhmi format, This contains resote.sh script with many other files including  context_file.

On running autoconfig it automatically creates a folder with different files for that autoconfig run. After autoconfig run If you find something wrong( like application is not accessible because of last modification) stop the application tier services and go to the relevant autoconfig folder and run restore.sh script to restore previous autoconfig configuration.

The restore.sh will not actually restore the context_file but this will restore all the settings prior to this autoconfig run.(if you had a faulty configuration before, of course restore.sh will restore only those configurations)

After restore.sh is run start up the services(don't run autoconfig), access the application, check the modifications and correct the modifications causing trouble in application. To take effect of new modifications(this must be done using autoconfig editor from OAM) shutdown application services and run autoconfig.

The restore.sh will take you back to the previous configuration (ie the configuration you had when you run autoconfig).



Lets do a test

Change Active Web Port from its value current value 8001to 'bbb'

Save the change when you are asked to change the  dependent parameter say no and click OK on next page. On saving, it will tell you to run autoconfig for new changes to take effect.
Stop the application services and run autoconfig.
Running autoconfig  completes with errors,  lets start the application services and try to access the page.



The page is not appearing because of the wrong port value.

Lets restore the previous autoconfig configuration. Go to the [inst_dopt]/admin/out/ [mmddhhss] folder and run restore.sh. Don't run autoconfig after running restore.sh



Now access the application and go to autoconfig page, click on show history button, click on show differences from current configuration on history page

You can see the current and previous values here, use the restore previous value radio button to restore the correct value


Press ok button
Run autoconfig


Now access the application and go to autoconfig page, click on show history button, click on show differences from current configuration on history page and see.


No comments:

Post a Comment