On Docker, I currently use postgres:13-alpine
as my database for nextcloud:apache
.
I want to upgrade to postgres:15-alpine
.
Using official instructions, I dumped the db from postgres 13
PGPASSWORD="xxx" pg_dump nextcloud -U oc_myname -f /dump/nextcloud.dump
and restored it on postgres 15 with the official instructions
PGPASSWORD="xxx" psql -U oc_myname -d template1 -c "DROP DATABASE \"nextcloud\";"
PGPASSWORD="xxx" psql -U oc_myname -d template1 -c "CREATE DATABASE \"nextcloud\";"
PGPASSWORD="xxx" psql -U oc_myname -d nextcloud -f /dump/nextcloud.dump
But when I start Nextcloud on the postgres 15 database, it says 500 Internal Error, and that’s it.
I have also tried to backup with
pg_dumpall -U oc_myname > /dump/nextcloud.dumpall
and restore with the same process, but same result.
I have 2 questions:
- Is the official guide outdated? If yes, do you know of a better way to upgrade a Docker database?
- If I start a new empty postgres 15 container, and use Nextcloud to scan and add all files to the database, will I lose any information, e.g. file/activity history, app settings?