您的位置:首页 > 数据库

Postgresql的dump数据库备份与还原

2015-03-23 09:16 253 查看
备份

pg_dump.exe -h localhost -p 5432 -U postgres -F plain -v -f C:\Backup.sql db1 2> C:\Backup.log
pg_dump -U postgres DB001 > D://DB001.dmp


还原
psql.exe -h localhost -p 5432 -U postgres -d db1 -f C:\Backup.sql


psql -U postgres -d NEWDB001 -f D://DB001.dmp

SQL备份
pg_dumpall.exe -h localhost -p 5432 -U postgres -v -f C:\All.sql 2> C:\All.log


SQL还原
psql.exe -h localhost -p 5432 -U postgres -f C:\All.sql
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: