pg_dump, pg_restore – typowe użycie

# dump bazy db1 do pliku db1.dat
pg_dump -h -U postgres -ObFc -f db1.dat db1
pg_dump -h -U postgres -ObFp -f db1.sql db1

# tworzymy nowa baze db2

# restore z pliku db1.dat do bazy db2
pg_restore -h -U postgres -d db2 db1.dat

This entry was posted in PostgreSQL and tagged , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">