Skip to content
Snippets Groups Projects
Verified Commit 640ed90b authored by Eliot Berriot's avatar Eliot Berriot
Browse files

Fixed a few typos with Docker/postgres upgrade instructions

parent e3d8c748
Branches
Tags
No related merge requests found
...@@ -78,18 +78,18 @@ Thankfully, there is a Docker container available to automate this process. You ...@@ -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``, can use the following snippet to upgrade your database in ``./postgres``,
keeping a backup of the old version in ``./postgres-old``: 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. # Replace "9.4" and "11" with the versions you are migrating between.
export OLD_POSTGRES=9.4 export OLD_POSTGRES=9.4
export NEW_POSTGRES=11 export NEW_POSTGRES=11
docker-compose stop postgres docker-compose stop postgres
docker run --rm \ docker run --rm \
-v `pwd`/data/postgres:/var/lib/postgresql/${OLD_POSTGRES}/data \ -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-new:/var/lib/postgresql/${NEW_POSTGRES}/data \
tianon/postgres-upgrade:${OLD_POSTGRES}-to-${NEW_POSTGRES} tianon/postgres-upgrade:${OLD_POSTGRES}-to-${NEW_POSTGRES}
# Add back the access control rule that doesn't survive the upgrade # 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 # Swap over to the new database
mv ./data/postgres ./data/postgres-old mv ./data/postgres ./data/postgres-old
mv ./data/postgres-new ./data/postgres mv ./data/postgres-new ./data/postgres
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment