pgsync

Sync Postgres data between databases with support for large tables

brewmacoslinux
Try with needOr install directly
Source

About

Sync Postgres data between databases

Commands

pgsync

Examples

Sync specific tables from source to destination database$ pgsync --source postgresql://user:pass@localhost/source_db --destination postgresql://user:pass@localhost/dest_db --tables users,orders
Perform a full database sync with truncate$ pgsync --source postgresql://user:pass@localhost/source_db --destination postgresql://user:pass@localhost/dest_db --truncate
Sync with where clause to filter records$ pgsync --source postgresql://user:pass@localhost/source_db --destination postgresql://user:pass@localhost/dest_db --tables orders --where 'created_at > 2024-01-01'