Backup & Restore commands for postgres database
-Backup using dumpall command (take backup of all db's):
pg_dumpall -c -U postgres -h localhost -p 5432 -f sample.dump
-Restore using psql command
psql -U postgres -h localhost -p 5432 -f sample2.dump postgres
No comments:
Post a Comment