The pg_dump utility is the first utility most Postgres users encounter when creating a backup. However, because the pg_dump utility is used to backup a single Postgres database, users and groups aren't included in the backup contents.
The solution to this issue is to first do a pg_dumpall using the -g option, which will backup global objects ... users and groups. This video demonstrates how to accomplish the backup of Postgres users and groups using pg_dumpall.
5 окт 2024