Guide for Postgresql Backup and Restore
Let’s consider the following for easy understanding of tutorial
DB DB Name: admindb
DB UserName : postgres
DB Backup:
Backup: $ pg_dump -U postgres admindb -f admindb.sql
Config DB Restore:
Restore: $ psql -U postgres -d admindb -f admindb.sql
Backup a single postgres table:
Example: test.sql and test1.sql from admindb
pg_dump --table test -U postgres admindb -f test.sql
pg_dump --table test1 -U postgres admindb -f test1.sql
Restore a single table to config DB( admindb ):
Category: Database, DB, Linux, Postgres, Tips and Tricks
0 comments