Wednesday, June 26, 2013

Export data source configs from one Application Server node and import to another.


Here, we used registry checkin client tool to export data source configurations from WSO2 Application Server  registry and import to another Application Server instance.

i) When you create a data source from wizard, it will be stored in registry as a XML resource.

/_system/config/repository/components/org.wso2.carbon.ndatasource



ii) Copy checkin-client.sh or checkin-client.bat to AS_HOME/bin.

ii) Copy the checkin-client-4.5.3.jar to the AS_HOME/repository/lib.

iii) Start the Application server and go the bin directory and execute the following command to dump the data source configurations.

sh checkin-client.sh co https://localhost:9443/registry/_system/config/repository/components/org.wso2.carbon.ndatasource -u admin -p admin -f ds.dump

Now all the data source configurations will dump to ds.dump file (it is in the bin directory).

iv) Execute the following command to import the data source configurations to next Application Server (9444).

sh checkin-client.sh ci https://localhost:9444/registry/_system/config/repository/components/org.wso2.carbon.ndatasource -u admin -p admin -f ds.dump file

v) Restart the server.
 
Resource location : https://svn.wso2.org/repos/wso2/people/ajith/blog/checkin-client/

Documentation : http://docs.wso2.org/wiki/display/Governance460/Check-in+Client