From 640ed90b42ff8a097324772055986316f2a30be7 Mon Sep 17 00:00:00 2001 From: Eliot Berriot Date: Tue, 29 Jan 2019 14:18:47 +0100 Subject: [PATCH] Fixed a few typos with Docker/postgres upgrade instructions --- docs/upgrading/index.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/upgrading/index.rst b/docs/upgrading/index.rst index 7942bd288..577066fc3 100644 --- a/docs/upgrading/index.rst +++ b/docs/upgrading/index.rst @@ -62,7 +62,7 @@ easy: This is a warning, not an error, and it can be safely ignored. Never run the ``makemigrations`` command yourself. - + Upgrading the Postgres container ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -78,18 +78,18 @@ Thankfully, there is a Docker container available to automate this process. You can use the following snippet to upgrade your database in ``./postgres``, keeping a backup of the old version in ``./postgres-old``: -.. parsed-literal:: +.. code-block:: shell # Replace "9.4" and "11" with the versions you are migrating between. export OLD_POSTGRES=9.4 export NEW_POSTGRES=11 docker-compose stop postgres docker run --rm \ - -v `pwd`/data/postgres:/var/lib/postgresql/${OLD_POSTGRES}/data \ - -v `pwd`/data/postgres-new:/var/lib/postgresql/${NEW_POSTGRES}/data \ + -v $(pwd)/data/postgres:/var/lib/postgresql/${OLD_POSTGRES}/data \ + -v $(pwd)/data/postgres-new:/var/lib/postgresql/${NEW_POSTGRES}/data \ tianon/postgres-upgrade:${OLD_POSTGRES}-to-${NEW_POSTGRES} # Add back the access control rule that doesn't survive the upgrade - echo "host all all all trust" | sudo tee -a ./postgres-new/pg_hba.conf + echo "host all all all trust" | sudo tee -a ./data/postgres-new/pg_hba.conf # Swap over to the new database mv ./data/postgres ./data/postgres-old mv ./data/postgres-new ./data/postgres