Created
September 14, 2012 05:40
-
-
Save zernel/3720010 to your computer and use it in GitHub Desktop.
Backup the database
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
导出数据库pg_dump -Fc mydb > db_name.dump | |
导入数据库 pg_restore -d mydb db_name.dump | |
导出 pg_dump mydb > db_name.sql | |
表导出 pg_dump database -t table > table.sql | |
加上' -a '可只到导出表内容,不导出表结构 | |
导入 psql database < xx.sql | |
二进制导出 pg_dump -Fc mydb > db_name.dump | |
二进制导入 pg_restore -d mydb db_name.dump |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment