Upgrade Documentation: need to include db name when restoring from SQL dump
In Step 11 of the Upgrade between major versions section of the Upgrade Documentation, the DB name is not included in the command line to restore from SQL dump. With the default installation settings, this will fail.
psql
expects the default database to be postgres
, whereas on a default installation of MayanEDMS, the db name is mayan_db
. (At least, I believe it is)
If you don't include the db name in the command, you'll get an unhelpful message like:
psql: error: FATAL: database "mayan_user" does not exist
So the command line should be:
cat mayan.sql | docker-compose --file docker-compose.yml --project-name mayan exec -T postgresql /bin/bash -c 'psql --username="$POSTGRES_USER" --dbname="$POSTGRES_DB"'