pg_restore restores a PostgreSQL database from an archive created by pg_dump.

Usage:
  pg_restore [OPTION]... [FILE]

General options:
  -d, --dbname=NAME        connect to database name
  -f, --file=FILENAME      output file name
  -F, --format=c|d|t       backup file format (should be automatic)
  -l, --list               print summarized TOC of the archive
  -v, --verbose            verbose mode
  --help                   show this help, then exit
  --version                output version information, then exit

Options controlling the restore:
  -a, --data-only          restore only the data, no schema
  -c, --clean              clean (drop) database objects before recreating
  -C, --create             create the target database
  -e, --exit-on-error      exit on error, default is to continue
  -I, --index=NAME         restore named index
  -j, --jobs=NUM           use this many parallel jobs to restore
  -L, --use-list=FILENAME  use table of contents from this file for
                           selecting/ordering output
  -n, --schema=NAME        restore only objects in this schema
  -O, --no-owner           skip restoration of object ownership
  -P, --function=NAME(args)
                           restore named function
  -s, --schema-only        restore only the schema, no data
  -S, --superuser=NAME     superuser user name to use for disabling triggers
  -t, --table=NAME         restore named table
  -T, --trigger=NAME       restore named trigger
  -x, --no-privileges      skip restoration of access privileges (grant/revoke)
  -1, --single-transaction
                           restore as a single transaction
  --disable-triggers       disable triggers during data-only restore
  --no-data-for-failed-tables
                           do not restore data of tables that could not be
                           created
  --no-security-labels     do not restore security labels
  --no-tablespaces         do not restore tablespace assignments
  --use-set-session-authorization
                           use SET SESSION AUTHORIZATION commands instead of
                           ALTER OWNER commands to set ownership

Connection options:
  -h, --host=HOSTNAME      database server host or socket directory
  -p, --port=PORT          database server port number
  -U, --username=NAME      connect as specified database user
  -w, --no-password        never prompt for password
  -W, --password           force password prompt (should happen automatically)
  --role=ROLENAME          do SET ROLE before restore

If no input file name is supplied, then standard input is used.

Report bugs to <pgsql-bugs@postgresql.org>.

额外参考:https://xly3000.wordpress.com/2012/03/07/postgresql%E8%87%AA%E5%8A%A8%E5%A4%87%E4%BB%BDbackup%E4%B8%8E%E6%81%A2%E5%A4%8Drestore%E6%95%B0%E6%8D%AE%E5%BA%93%E5%9B%BE%E8%A7%A3/

 
 

最新文章

  1. K3数据库表结构
  2. 制作Win7(x86)PE ISO文件
  3. Java中的TCP/UDP网络通信编程
  4. sql: PL/SQL proc
  5. Chrome渲染分析之Timeline工具的使用
  6. 【Android Developers Training】 20. 创建一个Fragment
  7. ZooKeeper之(六)应用实例
  8. Windows7下使用mingw编译openssl
  9. vector的简易实现
  10. 这样入门asp.net core 之 静态文件
  11. 6.6 Pandora 实操 - API/SDK
  12. 虚函数表:QT5与VS2015的差异
  13. Android OpenGL ES 开发(N): OpenGL ES 2.0 机型兼容问题整理
  14. [转]微擎load()文件加载器
  15. Spring Boot使用JWT实现系统登录验证
  16. 编写陈旭,实现通过字符型变量创建boolean值,再将其转换为字符串输出,观察输出后的字符串与创建Boolean对象时给定的参数是否相等.
  17. 简话Angular 04 Angular过滤器详解
  18. loadrunner生成随机uuid的方法
  19. 破解ZendStudio 10.1
  20. abp 调试

热门文章

  1. Android自定义Button的“款式”
  2. Linux信号实践(2) --信号分类
  3. Leetcode_28_Implement strStr
  4. Leetcode_119_Pascal&#39;s Triangle II
  5. 集群通信组件tribes之集群的平行通信
  6. 1.Linux下libevent和memcached安装
  7. 打包volley
  8. 【Matlab编程】哈夫曼编码的Matlab实现
  9. Cocos2D绘制纹理的一般方法
  10. ffdshow 源代码分析 2: 位图覆盖滤镜(对话框部分Dialog)