{"repo":"ankane/pgsync","free":true,"listed":false,"github":"https://github.com/ankane/pgsync","clone":"git clone https://github.com/ankane/pgsync.git","description":"Sync data from one Postgres database to another","language":"Ruby","stars":3467,"topics":["postgresql"],"license":"MIT","category":"databases-storage","readme_excerpt":"pgsync Sync data from one Postgres database to another (like pg dump / pg restore ). Designed for: - speed - tables are transferred in parallel - security - built-in methods to prevent sensitive data from ever leaving the server - flexibility - gracefully handles schema differences, like missing columns and extra columns - convenience - sync partial tables, groups of tables, and related records :tangerine: Battle-tested at Instacart Installation pgsync is a command line tool. To install, run: This will give you the pgsync command. If installation fails, you may need to install dependencies. You can also install it with Homebrew: Or Docker. Setup In your project directory, run: This creates .pgsync.yml for you to customize. We recommend checking this into your version control (assuming it doesn’t contain sensitive information). pgsync commands can be run from this directory or any subdirectory. How to Use First, make sure your schema is set up in both databases. We recommend using a schema migration tool for this, but pgsync also provides a few convenience methods. Once that’s done, you’re ready to sync data. Sync tables Sync specific tables Works with wildcards as well Sync specific rows (existing rows are overwritten) You can also preserve existing rows Or truncate them Tables Exclude specific tables Add to .pgsync.yml to exclude by default Sync tables from all schemas or specific schemas (by default, only the search path is synced) Groups Define groups in .pgsync.yml : And ","default_branch":null,"files":null,"tree":[],"storefront":"/r/ankane","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/ankane/pgsync/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}