My use case is as follows:

I have an application that uses ArangoDB as its primary database.  My 
application (the part that talks to ArangoDB) is a Java REST service. 
 Sometimes, when I upgrade my application, I need to make changes to the 
underlying data in the ArangoDB database (for example, adding, removing, or 
transforming document properties).  To make things easier, I want to 
automate this process.  Meaning I want to automatically kick-off a "data 
upgrade" when a new version of my app runs for the first time.  I have that 
part figured out and working.

However, I know there is always a potential that something happens during 
the upgrade process, and not all of the data is "upgraded" properly.  Since 
ArangoDB does not support distributed transactions, I need another 
mechanism to ensure I can "rollback" to my pre-upgrade state and try again, 
or just keep using the old version of the app.  Ideally, I'd like a way to 
clone the database to a new database as a backup prior to kicking off the 
upgrade using my Java app, perform the upgrade, and then delete the clone 
"backup" once it is successful.  It seems like I have a few options:

1.  Using the Java driver, iterate through all Collections, Graphs, 
Indexes, etc in the current DB, and programmatically recreate them in a new 
DB.  This is "clean", since I can do it all in Java code, but seems 
terribly inefficient (I'd have to transfer all of the data from the DB 
server to the app server, then back, for every single record in the 
database).

2.  Use Foxx to do the same thing as above, but "locally".  Seems more 
efficient, but still not perfect (and I have zero Foxx experience, so a bit 
of a learning curve).

3.  Use Foxx or some other mechanism to remotely trigger an execution of 
arangodump and/or arangoexport to dump the database before the upgrade.

Has anyone attempted anything similar in the past?  Does anyone have ideas 
on alternatives not mentioned above?

-- 
You received this message because you are subscribed to the Google Groups 
"ArangoDB" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to