I have PostgreSQL server version 9.5. Contains 20 Databases.
I want take server backup skipping of some 10 databases.
Am using pg_dumpall, but it was taking full server backup.
thanks,
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It only takes a minute to sign up.
Sign up to join this communityInstead of using pg_dumpall
, just use pg_dump
and specify which databases you want to dump. One possible way to do it is:
for db in <space-separated list of database names>
do
pg_dump -U <user> -h <host> ${db} > ${db}.dmp
done