Skip to content
mamahoos edited this page Aug 19, 2026 · 2 revisions

pgsync Wiki

One-shot PostgreSQL logical sync — copy one database to another with pg_dump | psql.

Distribution Link
GitHub Action (Marketplace) postgres-logical-sync
Repository mamahoos/pgsync
Docker (GHCR) ghcr.io/mamahoos/pgsync

Wiki pages

  • GitHub Action — full reference: inputs, secrets, workflows, security, troubleshooting
  • CLI & Docker — install, flags, and local usage (README)

What pgsync is (and is not)

Is:

  • A single logical dump streamed from source to target (pg_dump | psql)
  • Opinionated defaults: --no-owner, --no-privileges, --clean --if-exists (unless disabled)
  • Available as CLI, Docker image, and composite GitHub Action

Is not:

  • Incremental replication, CDC, or bidirectional sync
  • A replacement for managed backup/DR products
  • Suitable for very large databases without planning (full dump over the network every run)

Quick Action example

- uses: mamahoos/pgsync@v2
  with:
    source: ${{ secrets.PGSYNC_SOURCE_URI }}
    target: ${{ secrets.PGSYNC_TARGET_URI }}

See GitHub Action for the complete guide.

Clone this wiki locally