PostgreSQL will allow a backup and then epic fail on the restore if you don’t have users and roles etc pre defined.
It’s the hardest thing to achieve in PostgreSQL.
PostgreSQL will allow a backup and then epic fail on the restore if you don’t have users and roles etc pre defined.
It’s the hardest thing to achieve in PostgreSQL.
For an actual backup solution, not one off stuff, use a tool like pgbackrest. It's just way better.
I’ll give dumpall a go today. I do still feel this could be improved in PostgreSQL because there’s sooo many blog posts who suggest dump and none of them work.
?? in my lonely research world, the PG backup defaults and restore behavior have always been gentle and predictable. I generally backup per-database, never by cluster
If I create all the roles up front then it works. But it’s a hassle compared to SQLServer where I can backup, restore, create a user and link him to the database user. And it’s done.