(六)流的应用
1 导出数据,通过管道和psql工具,导入到目的库
The ability of pg_dump and psql to write to or read from pipes makes it possible to dump a database directly from one server to another, for example:
pg_dump -h host1 dbname | psql -h host2 dbname
2 导出数据到标准输出
pg_dump dbname > outfile
3 导出大于操作系统所支持的最大文件的大数据量
pg_dump dbname | gzip > filename.gz
4 恢复大数据量的数据到目的库
gunzip -c filename.gz | psql dbname
or:
cat filename.gz | gunzip | psql dbname
1 导出数据,通过管道和psql工具,导入到目的库
The ability of pg_dump and psql to write to or read from pipes makes it possible to dump a database directly from one server to another, for example:
pg_dump -h host1 dbname | psql -h host2 dbname
2 导出数据到标准输出
pg_dump dbname > outfile
3 导出大于操作系统所支持的最大文件的大数据量
pg_dump dbname | gzip > filename.gz
4 恢复大数据量的数据到目的库
gunzip -c filename.gz | psql dbname
or:
cat filename.gz | gunzip | psql dbname