Postgresql备份之pg_dump

[postgre@pg-1 postgresql-9.4.4]$ pg_dump  --help
pg_dump dumps a database as a text file or to other formats.

Usage:
  pg_dump [OPTION]... [DBNAME]

General options:
  -f, --file=FILENAME         output file name
         输出到指定文件
  -F, --format=c|t|p          output file format (custom, tar, plain text)
         输出格式:
        c: 输出适于给 pg_restore 用的客户化归档。 这是最灵活的格式,它允许对装载的数据和对象定义进行重新排列。
           这个格式缺省的时候是压缩的
       t:  输出适合输入到 pg_restore 里的tar归档文件。 使用这个归档允许在恢复数据库时重新排序和/或把数据库对象排除在外。
 同时也可 能可以在恢复的时候限制对哪些数据进行恢复。
      p: 输出纯文本SQL脚本文件(缺省)
  -v, --verbose               verbose mode
       这样将令 pg_dump 输出详细的对象评注以及转储文件的启停时间和进度信息到标准输出上。
  -Z, --compress=0-9          compression level for compressed formats
           压缩级别
  --lock-wait-timeout=TIMEOUT fail after waiting TIMEOUT for a table lock
  --help                      show this help, then exit
  --version                   output version information, then exit

Options controlling the output content:
  -a, --data-only             dump only the data, not the schema
           只输出数据,不输出模式(数据定义)
  -b, --blobs                 include large objects in dump
           包含大对象 

  -c, --clean                 clean (drop) database objects before recreating
           输出在创建数据库创建命令之前先清理(删除)该数据库对象的命令。
          这个选项只是对纯文本格式有意义。对于归档格式,你可以在调用
  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值