Issues when upgrading from Peertube 2.4 to 3.1

Hi,

I am using docker compose to run Peertube (with the yml file). When I follow the update procedure from the help file, which is to delete the old conatiners and pull the new ones, I get the following error from the Postgres docker container:

PostgreSQL Database directory appears to contain a database; Skipping initialization                                                                                                                       
                                                                                                                                                                                                           
2021-04-18 15:46:25.137 UTC [1] FATAL:  database files are incompatible with server                                                                                                                        
2021-04-18 15:46:25.137 UTC [1] DETAIL:  The data directory was initialized by PostgreSQL version 10, which is not compatible with this version 13.2.

I guess I need to update the SQL database somehow.

Where can I find the procedures for that?

Thanks!

hi @redspace,

Something like Migrate a PostgreSQL Container to a New Major Version - Jan-Lukas Else will help you there.

1 « J'aime »

Thank you! I was able to update it with the tutorial.

The only thing that did not work was the psql -U peertubeuser < pgdump.

I had to add -d parameter → psql -U peertubeuser -d peertube < /var/lib/postgresql/data/pgdump

I didn’t work for me but using docker-postgres-upgrade while making sure users are correct https://github.com/tianon/docker-postgres-upgrade/issues/10#issuecomment-541285270 and pg_hba.conf exists https://github.com/tianon/docker-postgres-upgrade/issues/16 did.