導(dǎo)出PostgreSQL數(shù)據(jù)庫中的數(shù)據(jù):
$ pg_dump -U postgres -f mydatabase.sql
mydatabase
導(dǎo)入數(shù)據(jù)時(shí)首先創(chuàng)建數(shù)據(jù)庫再用psql導(dǎo)入:
$ createdb newdatabase$ psql -d newdatabase -U postgres -f mydatabase.sql
導(dǎo)出PostgreSQL數(shù)據(jù)庫中的數(shù)據(jù):
$ pg_dump -U postgres -f mydatabase.sql
mydatabase
導(dǎo)入數(shù)據(jù)時(shí)首先創(chuàng)建數(shù)據(jù)庫再用psql導(dǎo)入:
$ createdb newdatabase$ psql -d newdatabase -U postgres -f mydatabase.sql