[PATCH 4/5] docs: Add note on backing up the docker database
stephen at that.guru
Mon Mar 26 05:28:22 AEDT 2018
I'm sick of waiting for 'parsearchive' to finish.
Signed-off-by: Stephen Finucane <stephen at that.guru>
docs/development/installation.rst | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/docs/development/installation.rst b/docs/development/installation.rst
index 90c07b5b..f77147d8 100644
@@ -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.
More information about the Patchwork