Reputation: 1
I want to make a clone/duplicate of a database I have in ArangoDB. This https://stackoverflow.com/a/27827457 is one way I saw to do it, but it doesn't work for me because I can't run arangodump or any of the other Arango commands (like arangosh, arangorestore, etc.).
Also, why can't I run arangodump? This answer https://stackoverflow.com/a/63074313 says to "Open terminal and use cd to go to the directory in which arangoimport.exe is stored", but I can't find arangoimport.exe anywhere.
I looked on the ArangoDB website already, but I couldn't find any info.
Upvotes: 0
Views: 974
Reputation: 514
If you don't have access to arangodump
and arangorestore
on server, then easiest way to invoke them is via docker and access your server by adding --server.endpoint
option, you'll need to map some volume/directory to container to preserve dumped data for restoring them in other container, something like this:
#dump data to /tmp/dump at your host
docker run -it --rm -v /tmp/dump:/dump arangodb/arangodb:3.7.6 arangodump --server.endpoint http+tcp://192.168.1.2:8529
#restore data from /tmp/dump at your host
docker run -it --rm -v /tmp/dump:/dump arangodb/arangodb:3.7.6 arangorestore --server.endpoint http+tcp://192.168.1.2:8529
documentation of all available options, including examples are here for arangodump and here for arangorestore
other option is to write your own implementation of dump and restore utilizing ArangoDB REST APIs, but that's hefty and error prone task comparing to installing docker and then running provided dump and restore tools
Upvotes: 3