PSQL Backup
Backup db pg_dump -h -p -U postgres -d db_name -F c -b -v -f file.sql -d db_name -F c: more efficient -b: binary data incluyed (blobs or binary objects) -v: more detailed -f: file_name Backup roles 1 pg_dumpall -h <origin ip> -p <origin port> -U postgres --roles-only -f roles.sql Restore drop db before recovery 1 2 postgres=# DROP DATABASE db_name; DROP DATABASE create db 1 createdb -h <destination ip> -p <destination port> -U postgres db_name restore pg_restore -h -p -U postgres -d db_name -v file....