• 技术文章 >数据库 >PostgreSQL

    postgresql怎么备份

    silencementsilencement2020-02-12 14:58:41原创1465

    postgresql数据库的备份和还原命令pg_dump

    常用命令:

    备份:

    pg_dump -U postgres -d myDBname -f dump.sql

    其中

    postgres是用户名

    myDBname是数据库名

    dump.sql是文件名

    还原:

    createdb newDBname
    psql -d newDBname -U postgres -f dump.sql

    其中

    postgres是用户名

    newDBname是数据库名

    dump.sql是文件名

    推荐学习《Python教程》。

    专题推荐:数据库
    品易云
    上一篇:postgresql数据库怎么备份 下一篇:怎么判断postgresql是否存在

    相关文章推荐

    • postgresql如何执行存储过程• 本地的postgresql怎么启动• 如何判断postgresql表是否存在

    全部评论我要评论

    © 2021 Python学习网 苏ICP备2021003149号-1

  • 取消发布评论
  • 

    Python学习网