From 62908092b9ea672bd06b5a7d8a54590838ece193 Mon Sep 17 00:00:00 2001 From: Henry Oswald Date: Tue, 1 Dec 2015 16:17:15 +0000 Subject: [PATCH] Added tip for copying the database when upgrading --- server-ce/README.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/server-ce/README.md b/server-ce/README.md index 2ac12723b6..405ba6406f 100644 --- a/server-ce/README.md +++ b/server-ce/README.md @@ -185,7 +185,17 @@ Once you are logged in as an admin user, you can visit `/admin/register` on your *Please make sure to back up all Mongo, Redis and on-disk data before upgrading.* -Stop and remove the currently running ShareLaTeX container: +#### Migrations +Data stored in Mongodb will be automatically migrated to the latest schemea when upgrading docker releases. **This can make downgrades impossible.** One recommended technique is to test the migration first. This can be done by copying the mongodb database and doing a test run against the copied data. + +``` +db.copyDatabase(sharelatex,sharelatex-copy) +# start the container up pointing at the new db +--env SHARELATEX_MONGO_URL=mongodb://dockerhost/sharelatex-copy +``` + +#### Upgrade process +To use the new docker container stop and remove the currently running ShareLaTeX container: ``` $ docker stop sharelatex