[PATCH 2/2] docs: Add note on restoring the docker database
Stephen Finucane
stephen at that.guru
Tue Apr 10 02:37:16 AEST 2018
If you back something up, you'd probably want to restore it soon enough
too.
Signed-off-by: Stephen Finucane <stephen at that.guru>
---
docs/development/installation.rst | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/docs/development/installation.rst b/docs/development/installation.rst
index f77147d8..f92765c1 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.
--
2.14.3
More information about the Patchwork
mailing list