What ROLE password in postgres?


I’m running nextcloud 20 in a docker container on a raspi 4 with postgres 11.
On a reboot of the raspi the database crashed; postgres stopped with a segmentation fault.
Since I had a dump of the database, I deleted the postgres folder, started postgres with docker-compose run and restored the database.

It worked - but the postgres role oc_ was not restored. It seems I have to pimp my pg_dump command.
I could create it with create role oc_ createdb;, but it complains about the missing password.
I tried the database password and my admin password with and without encrypted. Nothing works.

How do I correctly recreate the database role?

Thank you.

I’ll answer my own question:

The password is noted in config/config.php (‘dbpassword’).

So - when you backup your postgres db with pg_dump, don’t forget to
pg_dumpall -U nextcloud --roles_only
otherwise you can’t restore!