From 96760794e52c01cdbe354454ffb7a7b0d1fce219 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Sun, 25 Mar 2018 19:28:22 +0100 Subject: docs: Add note on backing up the docker database I'm sick of waiting for 'parsearchive' to finish. Signed-off-by: Stephen Finucane --- docs/development/installation.rst | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'docs/development') 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. -- cgit v1.2.3