docker-db-backup
docker-db-backup copied to clipboard
Postgres: no roles are backed up when SPLIT_DB is set
no roles backed up
Postgres: when we use SPLIT_DB, the databases are backed up perfectly and could be restored. BUT: the roles and their passwords are not backed up.
Suggestion: run a pg_dumpall -r after all backups.
Sure, that makes sense to me. Are you able to try tiredofit/db-backup:develop to see if it does what you are after?
You should see an additional file following the syntax of pgsql_roles_(db_host)_(timestamp).sql.(yourcompressiontype) post backup.
this looks pretty good. The user info is there, the CREATE DATABASE not. My bad: I should have requested pg_dumpall -g (same as --globals-only) instead.
No problem. I have a new :develop ready for a test.
That's somewhat better; I should have tested pg_dumpall better. We need just another command: pg_dumpall -s creates the schemas and tables (the latter is included in the pg_dump of the schemas). A complete restore then would need the globals, the schemas and then the content files for each schema. In some weeks I'll have another free machine to do a complete recovery test....
Sure not a problem. I can add the -s easy enough. I'm going to change the filenames and add a duplicate __ in front of the segment where the dbname is eg (pgsql__globals) and the schemas to avoid any conflicts. I'll add -s and push out a new :develop release shortly.
a restore to another machine worked using psql. The restore script told me psql wouldn't be possible. When this fine stuff is made public on github (no devel branch there), I can dig a bit. There are some databases to be migrated to another machine...
Sure thing, have a peek at the develop branch that is now available for you.