Тёмный

Backing up PostgreSQL users and groups (pg_dump and pg_dumpall) 

PostgresCourse.com
Подписаться 943
Просмотров 22 тыс.
50% 1

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

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 17   
@Fr33manTV
@Fr33manTV Год назад
This was very helpful and calmly and clearly explained with high quality audio and video. Thank you SO much for that.
@KenSeedarnee
@KenSeedarnee 9 месяцев назад
Really good, straight to the point and concise explanation of how to export a PostgreSQL DB!
@IMADETHISACCFORRAY
@IMADETHISACCFORRAY 3 года назад
Thanks, that's really helpful. Any plans to make a video covering how to create a backup from e.g a remote postgres running on AWS RDS onto a local backup machine? I'm trying to understand how I could automate daily backups to my extra linux machine.
@postgrescourse
@postgrescourse 3 года назад
No immediate plans to make a video covering that topic. However, almost all the binaries installed with PostgreSQL are simply client applications. Most of them have a "-h" option. That allows you to connect the client, in this case pg_dump, to a remote host. So, if you want to backup from RDS to a local server, you can simply run pg_dump on your local server and use "-h myrds-instance1.123456789012.us-east-1.rds.amazonaws.com" to connect to the remote RDS instance. The backup files will be created on the local server. From there, simply use cron to schedule the backup. There are several great backup utilities for PostgreSQL. However, for simple SQL backups of smaller databases, the approach above is easy to implement.
@juancarlospastillo7417
@juancarlospastillo7417 26 дней назад
Buen video .. quiero sacar un backup y me sale el error ... Pg_dump: el esquema 2201 no existe... Portgresql-11.?
@yehiamcp
@yehiamcp 3 года назад
Well explained, thanks. In some managed postgres DBs you can't run dumpall, because it needs super user permission. How can I dump users in that case?
@QuinnFavo
@QuinnFavo 2 года назад
Helpful! Thanks
@wackogames
@wackogames Год назад
So why use pg_dump at all if you can just use pg_dumpall without the -g parameter and have all the data and user objects in a single file?
@joaovictormello546
@joaovictormello546 Год назад
Gretae Video!
@vitache1276
@vitache1276 3 года назад
Very useful. Thanks. Do you offer PostgreSQL training?
@postgrescourse
@postgrescourse 3 года назад
Sure do - www.postgrescourse.com
@Hashterix
@Hashterix Год назад
Mine just refuses to produce the file on dump though. Frustrating af.
@tornoutlaw
@tornoutlaw 2 года назад
So to recap: If I have a postgres instance with 1 self created DB and I want to export both the DB and all the users, I use pg_dumpall without the -g flag? If I then import the dump file to a new postgres instance, will it overwrite the pre-existing default postgres schemes, i.e. information_schema, pg_catalog, pg_toast, public?
@braydenwerner197
@braydenwerner197 Год назад
thanks :)
@AmolGautam
@AmolGautam Год назад
thanks
@sajeevguru7151
@sajeevguru7151 3 года назад
Thanks do you viedo for pg restore ?
@jayaprakashduraisamy2184
@jayaprakashduraisamy2184 2 года назад
Hello Guys, I am an Oracle/SQL Server DBA. Currently I've a requirement for configuring postgresql database. Which am new to this environment and want to manage the database(Backup, Restore, Health Check, Alerts monitor). Kindly assist me on this
Далее
Logical Replication with PostgreSQL 10
13:43
Просмотров 33 тыс.
Postgres Backup and Recovery Best Practices
59:29
Просмотров 20 тыс.
POLI и Маша - Сигма бой
00:20
Просмотров 154 тыс.
PostgreSQL Indexing : How, why, and when.
31:21
Просмотров 78 тыс.
pgdump backup restore
31:13
Просмотров 34 тыс.
PostgreSQL Backup & Point-In-Time Recovery
19:31
Просмотров 65 тыс.