May 2024
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
2728293031  

Categories

May 2024
M T W T F S S
 12345
6789101112
13141516171819
20212223242526
2728293031  

Enabling the weblogic server to Backup/Archive the configurations(config directory) through WLST script

By enabling the backup/archiving, the administration Server can automatically backups the domain configuration (the entire domain-name/config directory) during the server boot to DOMAIN_HOME\config-original.jar and config-booted.jar. Also multiple versions of the domain config will be archived by the Administration Server, each time the domain configuration is modified into the DOMAIN_CONFIG\configArchive folder.The configuration archives can be used for system restoration in cases where accidental configuration changes need to be reversed.

The below WLST script will help us to enable the backup/archiving.

EnableArchiving.py

adminURL=’t3://localhost:8000′
adminUserName=’weblogic’
adminPassword=’welcome1′
connect(adminUserName, adminPassword, adminURL)
domainRuntime()
edit()
startEdit()
cmo.setConfigBackupEnabled(true)
cmo.setArchiveConfigurationCount(5)
save()
activate()

Execute the script.
cd %WLS_HOME%\common\bin
wlst.sh EnableArchiving.py

To verify the configuration- Login to admin console–>Click on Domain in the left panel–>Expand the Advanced in General Configuration section

weblogicssrrerew-2
When the Admin Server starts up it automatically makes a backup of  DOMAIN_HOME/config directory and stores it in DOMAIN_HOME/config-original.jar(original configuration file while restarting the server) and once the start up  completed(booted) successfully it makes a backup of DOMAIN_HOME/config directory and stores it in DOMAIN_HOME/config-booted.jar(the config file on which the server is booted successfully) .

Most of the cases both of the file contents will be same. If the server fails to boot successfully the config-booted.jar will not be generated and the old config-booted.jar file will be left as it is.

weblogicssrrerew-3
weblogicssrrerew-4
Also whenever the domain configuration is modified, the admin server archive the previous configurations to the DOMAN_HOME\configArchive folder.The files use the naming convention as config-number.jar, where number is the sequential number of the archive.After it reaches the maximum number of archive files specified in the configuration(ArchiveConfigurationCount – 5), older archive files will be discarded
weblogicssrrerew-5

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>