{"id":4629,"date":"2015-04-26T19:59:28","date_gmt":"2015-04-26T11:59:28","guid":{"rendered":"http:\/\/rmohan.com\/?p=4629"},"modified":"2015-04-26T19:59:28","modified_gmt":"2015-04-26T11:59:28","slug":"enabling-the-weblogic-server-to-backuparchive-the-configurationsconfig-directory-through-wlst-script","status":"publish","type":"post","link":"https:\/\/mohan.sg\/?p=4629","title":{"rendered":"Enabling the weblogic server to Backup\/Archive the configurations(config directory) through WLST script"},"content":{"rendered":"<div>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\u00a0multiple 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.<\/p>\n<p>The below WLST script will help us to enable the backup\/archiving.<\/p>\n<p><b>EnableArchiving.py<\/b><br \/>\n<b><br \/>\n<\/b>adminURL=&#8217;t3:\/\/localhost:8000&#8242;<br \/>\nadminUserName=&#8217;weblogic&#8217;<br \/>\nadminPassword=&#8217;welcome1&#8242;<br \/>\nconnect(adminUserName, adminPassword, adminURL)<br \/>\ndomainRuntime()<br \/>\nedit()<br \/>\nstartEdit()<br \/>\ncmo.setConfigBackupEnabled(true)<br \/>\ncmo.setArchiveConfigurationCount(5)<br \/>\nsave()<br \/>\nactivate()<\/div>\n<div>\nExecute the script.<br \/>\ncd %WLS_HOME%\\common\\bin<br \/>\nwlst.sh\u00a0EnableArchiving.py<\/p>\n<p>To verify the configuration- Login to admin console&#8211;&gt;Click on Domain in the left panel&#8211;&gt;Expand the Advanced in General Configuration\u00a0section<\/p><\/div>\n<div><\/div>\n<div><\/div>\n<div><a href=\"http:\/\/rmohan.com\/wp-content\/uploads\/2015\/04\/weblogicssrrerew-2.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4630\" src=\"http:\/\/rmohan.com\/wp-content\/uploads\/2015\/04\/weblogicssrrerew-2.jpg\" alt=\"weblogicssrrerew-2\" width=\"1060\" height=\"460\" srcset=\"https:\/\/mohan.sg\/wp-content\/uploads\/2015\/04\/weblogicssrrerew-2.jpg 1060w, https:\/\/mohan.sg\/wp-content\/uploads\/2015\/04\/weblogicssrrerew-2-300x130.jpg 300w, https:\/\/mohan.sg\/wp-content\/uploads\/2015\/04\/weblogicssrrerew-2-1024x444.jpg 1024w, https:\/\/mohan.sg\/wp-content\/uploads\/2015\/04\/weblogicssrrerew-2-150x65.jpg 150w, https:\/\/mohan.sg\/wp-content\/uploads\/2015\/04\/weblogicssrrerew-2-400x174.jpg 400w, https:\/\/mohan.sg\/wp-content\/uploads\/2015\/04\/weblogicssrrerew-2-900x391.jpg 900w\" sizes=\"(max-width: 1060px) 100vw, 1060px\" \/><\/a><\/div>\n<div>When the Admin Server starts up it automatically makes a backup of \u00a0DOMAIN_HOME\/config directory and stores it in DOMAIN_HOME\/config-original.jar(original configuration file while restarting the server) and once the start up \u00a0completed(booted) successfully it makes a backup of\u00a0DOMAIN_HOME\/config directory and stores it in DOMAIN_HOME\/config-booted.jar(the config file on which the server is booted successfully)\u00a0.<\/p>\n<p>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.<\/p><\/div>\n<div><\/div>\n<div><a href=\"http:\/\/rmohan.com\/wp-content\/uploads\/2015\/04\/weblogicssrrerew-3.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4631\" src=\"http:\/\/rmohan.com\/wp-content\/uploads\/2015\/04\/weblogicssrrerew-3.jpg\" alt=\"weblogicssrrerew-3\" width=\"460\" height=\"381\" srcset=\"https:\/\/mohan.sg\/wp-content\/uploads\/2015\/04\/weblogicssrrerew-3.jpg 460w, https:\/\/mohan.sg\/wp-content\/uploads\/2015\/04\/weblogicssrrerew-3-300x248.jpg 300w, https:\/\/mohan.sg\/wp-content\/uploads\/2015\/04\/weblogicssrrerew-3-150x124.jpg 150w, https:\/\/mohan.sg\/wp-content\/uploads\/2015\/04\/weblogicssrrerew-3-400x331.jpg 400w\" sizes=\"(max-width: 460px) 100vw, 460px\" \/><\/a><\/div>\n<div><\/div>\n<div><a href=\"http:\/\/rmohan.com\/wp-content\/uploads\/2015\/04\/weblogicssrrerew-4.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4632\" src=\"http:\/\/rmohan.com\/wp-content\/uploads\/2015\/04\/weblogicssrrerew-4.jpg\" alt=\"weblogicssrrerew-4\" width=\"711\" height=\"524\" srcset=\"https:\/\/mohan.sg\/wp-content\/uploads\/2015\/04\/weblogicssrrerew-4.jpg 711w, https:\/\/mohan.sg\/wp-content\/uploads\/2015\/04\/weblogicssrrerew-4-300x221.jpg 300w, https:\/\/mohan.sg\/wp-content\/uploads\/2015\/04\/weblogicssrrerew-4-150x111.jpg 150w, https:\/\/mohan.sg\/wp-content\/uploads\/2015\/04\/weblogicssrrerew-4-400x295.jpg 400w\" sizes=\"(max-width: 711px) 100vw, 711px\" \/><\/a><\/div>\n<div><\/div>\n<div>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 &#8211; 5), older archive files will be discarded<\/div>\n<div><a href=\"http:\/\/rmohan.com\/wp-content\/uploads\/2015\/04\/weblogicssrrerew-5.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-4633\" src=\"http:\/\/rmohan.com\/wp-content\/uploads\/2015\/04\/weblogicssrrerew-5.jpg\" alt=\"weblogicssrrerew-5\" width=\"478\" height=\"304\" srcset=\"https:\/\/mohan.sg\/wp-content\/uploads\/2015\/04\/weblogicssrrerew-5.jpg 478w, https:\/\/mohan.sg\/wp-content\/uploads\/2015\/04\/weblogicssrrerew-5-300x191.jpg 300w, https:\/\/mohan.sg\/wp-content\/uploads\/2015\/04\/weblogicssrrerew-5-150x95.jpg 150w, https:\/\/mohan.sg\/wp-content\/uploads\/2015\/04\/weblogicssrrerew-5-400x254.jpg 400w\" sizes=\"(max-width: 478px) 100vw, 478px\" \/><\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>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 [&#8230;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[56],"tags":[],"_links":{"self":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/4629"}],"collection":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4629"}],"version-history":[{"count":1,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/4629\/revisions"}],"predecessor-version":[{"id":4634,"href":"https:\/\/mohan.sg\/index.php?rest_route=\/wp\/v2\/posts\/4629\/revisions\/4634"}],"wp:attachment":[{"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4629"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4629"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mohan.sg\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4629"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}