加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

Postgresql的dump数据库备份与还原

发布时间:2020-12-13 17:20:51 所属栏目:百科 来源:网络整理
导读:备份 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 -

备份

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 -fD://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

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读