dimitri/pgcopydb:Postgres数据库复制工具


将 Postgres 数据库复制到目标 Postgres 服务器(pg_dump | pg_restore on steroids)
pgcopydb 是一个pg_dump | pg_restore在两个正在运行的 Postgres 服务器之间自动运行的工具。为了尽快将数据库复制到另一台服务器,人们希望使用并行选项pg_dump 并且仍然能够将数据流式传输到尽可能多的pg_restore作业。
使用pgcopydb时,可以通过这个简单的命令行实现复制:

$ export PGCOPYDB_SOURCE_PGURI="postgres://user@source.host.dev/dbname"
$ export PGCOPYDB_TARGET_PGURI=
"postgres://role@target.host.dev/dbname"

$ pgcopydb copy-db --table-jobs 8 --index-jobs 2


点击标题进入github