可以用做 pg_restore 的输入并且只会恢复项目 10 和 6,(以这个顺序): $pg_restore -L archive.list archive.file
指定生成的脚本的输出文件,或者出现-l选项时用于列表的文件,缺省是标准输出。 -F format--format=format 指定备份文件的格式。因为pg_restore会自动判断格式,所以如果一定要指定的话,它可以是下面之一: ccustom 备份的格式是来自pg_dump的自定义格式。 ddirectory 备份是一个目录归档。 ttar 备份是一个tar归档。
指定生成的脚本的输出文件,或者出现-l选项时用于列表的文件,缺省是标准输出。 -F format--format=format 指定备份文件的格式。因为pg_restore会自动判断格式,所以如果一定要指定的话,它可以是下面之一: ccustom 备份的格式是来自pg_dump的自定义格式。 ddirectory 备份是一个目录归档。 ttar 备份是一个tar归档。
如果没有 -N, -o, and -r,那么 pg_restore 以项目出现在归档的内容列表中的顺序恢复他们, 或者按照他们在 list-file 里面的顺序恢复他们——假如给出了 -L 的话。 -o 和 -r 的组合复制了 pg_dump 在创建归档的内容列表之前进行的排序, 因此,这个选项通常没必要声明。 -R --no-reconnect 这个选项已经...
* `-l`:列出备份文件中的所有表和数据。 * `-t 表类型`:指定要恢复的表类型,例如 all(所有表)、base(基础表)等。 * `-n 表名`:指定要恢复的具体表名。 * `-F 格式`:指定备份文件的格式,如 tsv(制表符分隔值)或 csv(逗号分隔值)。
备份还原方法:pg_dump和pg_restore,先仔细说明这两个命令,再记录我的操作方法。 pg_dump--将一个PostgreSQL数据库抽出到一个脚本文件或者其它归档文件中 pg_dump[option...][dbname] 选项option... 下面的命令行参数控制输出的内容和格式。 dbname 声明将要转储的数据库名。如果没有声明这个参数,那么使用环境...
We are using a linked PGWAL directory: lrwxrwxrwx 1 postgres postgres 15 Nov 7 17:50 pg_wal -> /pgwal/pg14_wal pgbackrest Docu (https://pgbackrest.org/user-guide-rhel.html#quickstart/perform-restore): The cluster needs to be stopped (in ...
$pg_restore -l db.dump > db.list The listing file consists of a header and one line for each item, e.g.: ; ; Archive created at Mon Sep 14 13:55:39 2009 ; dbname: DBDEMOS ; TOC Entries: 81 ; Compression: 9 ; Dump Version: 1.10-0 ; Format: CUSTOM ; Integer: 4 bytes ; ...
$ pg_restore archive.file -L archive.list选项 pg_restore 接受下列命令行参数 (长选项只有在一些平台上可用): archive-name 声明要恢复的备份文件的位置. 如果没有声明而且没有使用 -f选项, 则使用标准输入. -a, --data-only 只恢复数据,而不恢复表大纲(定义). -c, --clean 创建表大纲前先清理(...
If an archive contains large objects, then all large objects will be restored, or none of them if they are excluded via -L, -t, or other options. See also the pg_dump(1) documentation for details on limitations of pg_dump. Once restored, it is wise to run ANALYZE on each restored ...