From 6aa0e04dedad7ee438768d270cf50206a8c66ad3 Mon Sep 17 00:00:00 2001 From: Leopold Talirz Date: Fri, 29 Nov 2024 09:30:22 +0100 Subject: [PATCH 1/2] docs: moving the data directory When moving the data directory of an existing deployment, one needs to be careful to remove the existing containers (`bin/stop` is not enough). A use case for moving the data directory of an existing deployment is, for example, to move it to a more frequently backed-up location when the user base of the service grows. --- doc/persistent-data.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/doc/persistent-data.md b/doc/persistent-data.md index d5e867a1..7eb064f3 100644 --- a/doc/persistent-data.md +++ b/doc/persistent-data.md @@ -46,3 +46,14 @@ services: volumes: - redis-data:/data ``` + +## Moving the data directory + +If you want to move the data directory of an existing deployment to a different location, run the following commands from the `overleaf-tookit` repository: + +1. `bin/stop` to stop the overleaf service +2. `bin/docker-compose rm mongo sharelatex redis` to remove the containers +3. adjust the paths in the `config/overleaf.rc` configuration file (or leave the relative paths and just move the entire `overleaf-toolkit` directory) +4. `bin/init` and `bin/start` to start the overleaf service again + +Note: Step 2 is required, since the old mount path of the data directory is stored in the stopped containers and will not update when they are restarted. From 9687f4772a495499fb18fb4beaa943ee613f6eba Mon Sep 17 00:00:00 2001 From: Leopold Talirz Date: Fri, 29 Nov 2024 09:48:37 +0100 Subject: [PATCH 2/2] fix --- doc/persistent-data.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/persistent-data.md b/doc/persistent-data.md index 7eb064f3..1bbd97ef 100644 --- a/doc/persistent-data.md +++ b/doc/persistent-data.md @@ -53,7 +53,7 @@ If you want to move the data directory of an existing deployment to a different 1. `bin/stop` to stop the overleaf service 2. `bin/docker-compose rm mongo sharelatex redis` to remove the containers -3. adjust the paths in the `config/overleaf.rc` configuration file (or leave the relative paths and just move the entire `overleaf-toolkit` directory) +3. adjust the paths in the `config/overleaf.rc` configuration file and move the data directory (or leave the relative paths and just move the entire `overleaf-toolkit` directory) 4. `bin/init` and `bin/start` to start the overleaf service again Note: Step 2 is required, since the old mount path of the data directory is stored in the stopped containers and will not update when they are restarted.