]> git.ipfire.org Git - thirdparty/patchwork.git/commitdiff
docs: Add note on backing up the docker database
authorStephen Finucane <stephen@that.guru>
Sun, 25 Mar 2018 18:28:22 +0000 (19:28 +0100)
committerStephen Finucane <stephen@that.guru>
Sat, 7 Apr 2018 16:43:26 +0000 (17:43 +0100)
I'm sick of waiting for 'parsearchive' to finish.

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

index 90c07b5b0c124ed3640c7898e9f8677b2f91bb5f..f77147d839ffee93f2f498427280b0bdeda21f85 100644 (file)
@@ -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.