pgsync — screenshot of github.com

pgsync

pgsync efficiently syncs data from one Postgres database to another, leveraging parallel transfers and secure sensitive data handling, which is far more flexible than `pg_dump`/`pg_restore` for development.

Visit github.com →

Questions & Answers

What is pgsync?
pgsync is a command-line tool designed to synchronize data between two PostgreSQL databases. It focuses on speed, security, and flexibility for various syncing scenarios.
Who should use pgsync?
pgsync is suitable for developers and teams who need to replicate or migrate specific subsets of data from one Postgres database to another, especially for development, staging, or testing environments. It is particularly useful when `pg_dump`/`pg_restore` is too broad.
How does pgsync compare to pg_dump/pg_restore?
Unlike `pg_dump`/`pg_restore`, pgsync is designed for targeted data syncing, offering parallel table transfers for speed, the ability to sync specific tables or rows, and built-in features for handling sensitive data and schema differences. It provides more granular control than a full database dump.
When should I use pgsync?
Use pgsync when you need to quickly populate a local development database with fresh, sanitized data from production, synchronize specific application tables, or move data between environments while gracefully handling schema discrepancies and sensitive information.
How does pgsync handle sensitive data?
pgsync allows users to define data rules in the `.pgsync.yml` configuration file to prevent sensitive data from leaving the remote server. It supports various replacement options like `unique_email`, `random_date`, or custom SQL `statement`s to mask or transform data during sync.