summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Finucane <stephen@that.guru>2018-04-09 15:59:36 +0100
committerStephen Finucane <stephen@that.guru>2018-04-09 20:25:39 +0100
commitbba30eb62c94ffbec35574827a4718c7ec86a1bd (patch)
tree994cc9d7044955507d059460e8529462f9c1ca9e
parent493f599a2b7cb39d8d67a5f75a32c5cd3fed15c4 (diff)
downloadpatchwork-bba30eb62c94ffbec35574827a4718c7ec86a1bd.tar
patchwork-bba30eb62c94ffbec35574827a4718c7ec86a1bd.tar.gz
docs: Add note on restoring the docker database
If you back something up, you'd probably want to restore it soon enough too. Signed-off-by: Stephen Finucane <stephen@that.guru>
-rw-r--r--docs/development/installation.rst10
1 files changed, 9 insertions, 1 deletions
diff --git a/docs/development/installation.rst b/docs/development/installation.rst
index f77147d..a1bee1d 100644
--- a/docs/development/installation.rst
+++ b/docs/development/installation.rst
@@ -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.