]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
docs: Add note on restoring the docker database
authorStephen Finucane <stephen@that.guru>
Mon, 9 Apr 2018 14:59:36 +0000 (15:59 +0100)
committerStephen Finucane <stephen@that.guru>
Mon, 9 Apr 2018 19:25:39 +0000 (20:25 +0100)
If you back something up, you'd probably want to restore it soon enough
too.

Signed-off-by: Stephen Finucane <stephen@that.guru>
docs/development/installation.rst

index f77147d839ffee93f2f498427280b0bdeda21f85..a1bee1d1c25aabead819242ffdfdd3ad45878cc9 100644 (file)
@@ -106,7 +106,15 @@ backup the database at any stage, run:
         --password=DATABASEPASSWORD DATABASE > backup.sql
 
 where ``DATABASECONTAINER`` is found by ``docker ps -a`` and the other settings
-are the same as those defined in ``patchwork/settings/dev.py``.
+are the same as those defined in ``patchwork/settings/dev.py``. To restore this
+again, run:
+
+.. code-block:: shell
+
+    $ docker-compose run --rm web python manage.py dbshell
+    mysql> use DATABASE;
+    mysql> set autocommit=0; source backup.sql; commit;
+    mysql> exit;
 
 Any local edits to the project files made locally are immediately visible to
 the Docker container, and so should be picked up by the Django auto-reloader.