When it comes to data migration, ModeShape offers a backup&restore mechanism via its API. However, for clients to be able to use this, they would have to write code.
So a client migrating between 2 different versions of ModeShape which are binary-incompatible(thanks to Infinispan) would effectively have to:
1. write code which uses the backup API and run this code on the old version of ModeShape - which also means that the backup API would be the one from the old version
2. update the version of ModeShape & start a fresh/empty repository using the new version
3. write code which uses the restore API from the new version and restore the repository from the backup created at step 1.
If the client is running ModeShape in a server (e.g. Wildfly/EAP) steps 1-3 become a lot more complicated since they require the client writing & deploying the code against a running application server -i.e. all the code has to be run server-side.
Even though the above steps are technically possible, this enhancement proposes a simplification of this process by enhancing ModeShape's existing REST service allowing the backup & restore operations:
- to perform a repository backup, one would issue a
request which would perform a repository backup in a temporary directory on the server (e.g. java.io.tmpdir) and then serve a zip of the backup to the user for download.
- to perform a repository restore, one would have to use a zip produced by the backup request and issue a
providing the ZIP file in the body of the request. In its simplest form, clients can use CURL:
Even though this enhancement isn't the ultimate in terms of the usability of backup & restore, I think it's a step forward in simplifying the process. Once
MODE-2443 is implemented, we should also have full UI support.