summaryrefslogtreecommitdiff
path: root/docs/development
diff options
context:
space:
mode:
authorStephen Finucane <stephen@that.guru>2018-03-25 19:28:22 +0100
committerStephen Finucane <stephen@that.guru>2018-04-07 17:43:26 +0100
commit96760794e52c01cdbe354454ffb7a7b0d1fce219 (patch)
tree1e75e038bcfbadff37bff7d812736f1134a7b743 /docs/development
parent68fd69ca7be813e0069c523d4021612f52b609b9 (diff)
downloadpatchwork-96760794e52c01cdbe354454ffb7a7b0d1fce219.tar
patchwork-96760794e52c01cdbe354454ffb7a7b0d1fce219.tar.gz
docs: Add note on backing up the docker database
I'm sick of waiting for 'parsearchive' to finish. Signed-off-by: Stephen Finucane <stephen@that.guru>
Diffstat (limited to 'docs/development')
-rw-r--r--docs/development/installation.rst13
1 files changed, 11 insertions, 2 deletions
diff --git a/docs/development/installation.rst b/docs/development/installation.rst
index 90c07b5..f77147d 100644
--- a/docs/development/installation.rst
+++ b/docs/development/installation.rst
@@ -96,8 +96,17 @@ run:
-v /tmp/.X11-unix:/tmp/.X11-unix \
-e PW_TEST_DB_HOST=db -e DISPLAY patchwork_web bash
-To reset the database before any of these commands, add `--reset` to the
-command line after `web` and before any other arguments.
+To reset the database before any of these commands, add ``--reset`` to the
+command line after ``web`` and before any other arguments. Conversely, to
+backup the database at any stage, run:
+
+.. code-block:: shell
+
+ $ docker exec DATABASECONTAINER /usr/bin/mysqldump -u DATABASEUSER \
+ --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``.
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.