Question

I'm interested in making a backup of all services deployed on WSO2 DSS so in case the server crashes, gets wiped, etc, I can install a new one and restored all services from a backup.

Can someone please explain how this can be achieved? (of course, I don't want to tar.gz the whole server installation, just important files)

Was it helpful?

Solution

Usually dataservice files (.dbs) contain the data service configuration. If you backup all the .dbs files in the (DSS_HOME/repository/deployment/server/dataservices) you can redeploy them by copying them to the same location.

OTHER TIPS

Just copying the .dbs files located in the directory "$DSS_HOME/repository/deployment/server/dataservices" wouldn't work if you use carbon datasources in your data service configurations. (But aforementioned option indeed WORKS if you only have INLINE data source configurations in your data service). If that's the case you would have to migrate a couple of other configuration files too depending on how you created your carbon datasources.

To explain more, there are two ways to configure datasources in any Carbon server. You can either use "#DSS_HOME/repository/conf/datasource/*-datasources.xml" or the management console itself to create data sources. However, if you follow the latter, then the data source configuration would get saved in the registry. Therefore, to migrate those configurations you will have to do a registry data migration too. However, the most easiest in terms of migration is the one I mentioned as my first option. There, you can define your datasource cofnigurtion in a configuration file, back it up and just copy it back to your newly installed DSS to be able to successfully migrate data source configurations too. The only glitch with that approach is that you would need to do a server restart if you need to do any changes to the data source configurations defined in the configuration file. However, I believe this would not usually be an issue in a production system as we rarely modify the datasource configurations, etc in such a system.

To delve further into this, to deal with a server crash etc, migrating only the dataservices and datasource configurations wouldn't be sufficient in my opinion as there might be several changes done to the other configurations as well. Also there might be certain runtime/development time data stored in the registry as well. In such a case, at minimum, you would have to back up the "$DSS_HOME/repository/conf" and "$DSS_HOME/repository/deployment" directories in terms of migrating configurations. In addition to that, to do a complete migration, you would have to consider backing up, "$DSS_HOME/repository/components/lib", "$DSS_HOME/repository/resources" (specially if you have keystores installed under the aforesaid file structure), etc and of the registry as well.

Hope this helps.

Cheers, Prabath

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top