SocCnx: more scripts added

Created:
Last Update:

Author: Christoph Stoettner
Read in about 2 min · 269 words

Fountain pen and a notebook

Photo by Aaron Burden | Unsplash

Because of a delay of some hours on my flight back from Social Connections V on saturday, i had time to rewrite the jython script for backing up and restore security roles in WebSphere Application Server.

I updated the master branch on GitHub , which now contains a db2 initscript and the two new scripts securityrolebackup.py and securityrolerestore.py !

You can call the scripts through wsadmin.sh|bat and they do following.

securityrolebackup.sh

cd $WAS_HOME/profiles/Dmgr01/bin
./wsadmin.sh -lang jython -username admin -password password -f "path/securityrolebackup.sh" "../temp"

This will save the security roles for each installed application to $WAS_HOME/profiles/Dmgr01/temp to single files named: Application.txt.

securityrolerestore.sh

cd $WAS_HOME/profiles/Dmgr01/bin
./wsadmin.sh -lang jython -username admin -password password -f "path/securityrolerestore.sh" "../temp"

This will take the backups from $WAS_HOME/profiles/Dmgr01/temp and restore all access rights in the single applications. All applications will be restored, but you can change the script for one or some of the applications, when you change from line 49:

49 apps = AdminApp.list()
50 appsList = apps.split(lineSeparator)
51 # Test with some Apps:
52 # appsList = ['Blogs','Activities','Wikis']
53 # or Single App:
54 # appsList = ['Blogs']

Comment out line 49 and 50, and remove # from line 52 to restore only some Application security roles, or remove # from 54 to restore only one!

Tipp

I had several updates and cr installations with IBM Connections the last years and on some of these the updateinstaller removes my configured security roles. Now you can backup before and restore after installing a fix.

Disclaimer

These scripts are provided as is, with no warranties, and confers no rights! Please test them before using in production environments.

Author
Add a comment
Error
There was an error sending your comment, please try again.
Thank you!
Your comment has been submitted and will be published once it has been approved.

Your email address will not be published. Required fields are marked with *

Suggested Reading
Aaron Burden: Fountain pen and a notebook
Klaus Bild provided two scripts for setting Connections Admins through jython and wsadmin. I want to add one detail, when you want to add multiple Admins, then you can use pipe | as delimiter. First line would be connwasadmin='wasadmin|conadmin' Thanks Klaus, i like to set the admins through a script, because fixpack installations often set the j2ee roles to default.
Created:
Last Update:
Read in about 1 min
Aaron Burden: Fountain pen and a notebook
As preparation for Social Connections VI in Prague next week i redesigned the Administration Scripts for IBM Websphere . Some highlights: all scripts are moved to a subfolder with DMGR/bin (folder name: ibmcnx) tested in multinode environments added some classes everybody can use for his own scripts adding policies to libraries (personal and communities) are using search now New scripts: documentation of all jvm settings of each application server create a file with all documentation in one step create cluster members for additional nodes Sharon created a document with the content of all of our presentations and collected several tipps all around connections and community scripts.
Created:
Last Update:
Read in about 1 min
Aaron Burden: Fountain pen and a notebook
It was little bit quiet here after Connect 2014. I had lots of projects and no time to add new scripts or even do bug fixing. I promised at Connect, that i will fix the JDBC drivers, that they will load on Windows too. See cnxMemberCheckExIDByEmail.py as an example. Loading JDBC Drivers within jython scripts Jan Riedel sent me a solution for SLES and i tested his proposal today within Windows. He points me in the right direction, i mustn’t load the path or jar within the script, it is better to load on starting wsadmin. You have to add the JDBC Driver path to WAS_EXT_DIRS.
Created:
Last Update:
Read in about 2 min