22 Ağustos 2019 Perşembe

pg_dumpall komutu

Giriş
Açıklaması şöyle.
pg_dump dumps only a single database at a time, and it does not dump information about roles or tablespaces (because those are cluster-wide rather than per-database). To support convenient dumping of the entire contents of a database cluster, the pg_dumpall program is provided. pg_dumpall backs up each database in a given cluster, and also preserves cluster-wide data such as role and tablespace definitions. The basic usage of this command is:

pg_dumpall > outfile
--globals-only seçeneği
Şöyle yaparız. Böylece örneğin kullanıcı bilgilerini de kaydedebiliriz.
pg_dumpall --globals-only  --file=globals.sql

Hiç yorum yok:

Yorum Gönder