Backup and restore ArangoDB data

You can easily back-up and restore the ArangoDB database from Windows. All you need is WinSCP, Putty, and some diskspace. I’m running the batch script below every time I login to my workstation automatically to backup the configuration database:

plink -batch -pw xxx -t root@ "systemctl stop arangodb3"
plink -batch -pw xxx -t root@ "cd /data/backup && zip -r /data/arangodb/data"
plink -batch -pw xxx -t root@ "systemctl start arangodb3"
pscp -pw xxx -v -r root@  G:\IoT\ArangoDB\
plink -batch -pw xxx -t root@ "rm /data/backup/"

You can restore the database by installing ArangoDB on another system and copying the data back into the correct directory. Make sure you stop the ArangoDB service before you restore the data.

When the ArangoDB version on the target system is newer then the ArangoDB version on the source system you need to upgrade the database first. Stop the ArangoDB service and start it in the console with the – parameter:

systemctl stop arangodb
/usr/sbin/arangod --uid arangodb --gid arangodb --pid-file /var/run/arangodb3/ --temp.path /var/tmp/arangodb3 --log.foreground-tty true