How to Update ArangoDb when running it in Docker



Since I already ran into this problem twice, here is a tiny reminder for my future self and potentially others that google something along the lines of the title. If you did `docker pull arangodb` at some point in the past, then ran a ArangoDB container for a while with something like the command blow and want to update, just follow the error messages! <span id="more-5352"></span> ```bash docker run \ -e ARANGO_ROOT_PASSWORD=p4ssw0rd -e ARANGO_STORAGE_ENGINE=rocksdb \ -v /db-storage/data:/var/lib/arangodb3 -v /db-storage/apps:/var/lib/arangodb3-apps \ -p 8529:8529 --name arangodb-instance -it arangodb ``` After a fresh `pull`, the container does not come back with and `docker logs arangodb-instance` tells you something like this: ```bash 2020-06-28T21:33:36Z [1] ERROR [3bc7f] {startup} Database directory version (30401) is lower than current version (30604). 2020-06-28T21:33:36Z [1] ERROR [ebca0] {startup} ---------------------------------------------------------------------- 2020-06-28T21:33:36Z [1] ERROR [24e3c] {startup} It seems like you have upgraded the ArangoDB binary. 2020-06-28T21:33:36Z [1] ERROR [8bcec] {startup} If this is what you wanted to do, please restart with the 2020-06-28T21:33:36Z [1] ERROR [b0360] {startup} --database.auto-upgrade true 2020-06-28T21:33:36Z [1] ERROR [13414] {startup} option to upgrade the data in the database directory. 2020-06-28T21:33:36Z [1] ERROR [7421a] {startup} Normally you can use the control script to upgrade your database' 2020-06-28T21:33:36Z [1] ERROR [fb665] {startup} /etc/init.d/arangodb stop 2020-06-28T21:33:36Z [1] ERROR [6753e] {startup} /etc/init.d/arangodb upgrade 2020-06-28T21:33:36Z [1] ERROR [f7b06] {startup} /etc/init.d/arangodb start 2020-06-28T21:33:36Z [1] ERROR [24bd1] {startup} ----------------------------------------------------------------------' 2020-06-28T21:33:36Z [1] ERROR [1c156] Database '_system' needs upgrade. Please start the server with --database.auto-upgrade 2020-06-28T21:33:36Z [1] FATAL [2eb08] Database '_system' upgrade failed (bad parameter). Please inspect the logs from the upgrade procedure and try starting the server again. ``` Simply append `--database.auto-upgrade true` at the very end of `docker run` to trigger an upgrade of the data store.

Leave a Reply

Your email address will not be published. Required fields are marked *