{"id":40665744,"url":"https://github.com/backplane/pgxfer","last_synced_at":"2026-01-21T09:09:07.875Z","repository":{"id":218620154,"uuid":"746933415","full_name":"backplane/pgxfer","owner":"backplane","description":"utility container for moving data between postgres instances with pg_dump + pg_restore","archived":false,"fork":false,"pushed_at":"2024-05-16T08:15:24.000Z","size":44,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-05-16T08:28:38.925Z","etag":null,"topics":["docker","postgres"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/backplane/pgxfer/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/backplane.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-22T23:42:58.000Z","updated_at":"2024-05-16T07:55:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"d6d59580-2a3f-436c-be28-7da803668a9c","html_url":"https://github.com/backplane/pgxfer","commit_stats":null,"previous_names":["backplane/pgxfer"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/backplane/pgxfer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/backplane%2Fpgxfer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/backplane%2Fpgxfer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/backplane%2Fpgxfer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/backplane%2Fpgxfer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/backplane","download_url":"https://codeload.github.com/backplane/pgxfer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/backplane%2Fpgxfer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28630940,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T04:47:28.174Z","status":"ssl_error","status_checked_at":"2026-01-21T04:47:22.943Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","postgres"],"created_at":"2026-01-21T09:09:07.091Z","updated_at":"2026-01-21T09:09:07.860Z","avatar_url":"https://github.com/backplane.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pgxfer\n\nThis container simplifies the process of moving a PostgreSQL database. The core functionality is based on a pipeline: `pg_dump ... | pg_restore ...`, which offers several advantages:\n\n- Accurate data transfer because the underlying tools [`pg_dump`](https://www.postgresql.org/docs/current/app-pgdump.html) and [`pg_restore`](https://www.postgresql.org/docs/current/app-pgrestore.html) are part of PostgreSQL\n- Fast execution times\n- Can be run from anywhere that can reach both databases\n- Minimal impact on database service during migration\n- Does not require intermediate storage, as the process is stream-based.\n\nRepo         | URL\n------------ | --------------------------------------------\nSource Code  | \u003chttps://github.com/backplane/pgxfer/\u003e\nDocker Image | \u003chttps://hub.docker.com/r/backplane/pgxfer/\u003e\n\n\n## Usage\n\nThe program emits the following help text when invoked with `-h` or `--help` flags.\n\n```\nusage: pgxfer [-h] [--clean-dest | --no-clean-dest]\n              [--init-dest | --no-init-dest] [--owner | --no-owner]\n              [--acl | --no-acl]\n              [--log-level {CRITICAL,ERROR,WARNING,INFO,DEBUG,NOTSET}]\n              [--log-dir LOG_DIR] [--source-host SOURCE_HOST]\n              [--source-port SOURCE_PORT] [--source-username SOURCE_USERNAME]\n              [--source-password SOURCE_PASSWORD] [--source-name SOURCE_NAME]\n              [--dest-host DEST_HOST] [--dest-port DEST_PORT]\n              [--dest-username DEST_USERNAME] [--dest-password DEST_PASSWORD]\n              [--dest-name DEST_NAME]\n\nutil for copying databases between postgres servers\n\noptions:\n  -h, --help            show this help message and exit\n  --clean-dest, --no-clean-dest\n                        before restoring database objects, issue commands to\n                        DROP all the objects that will be restored (default:\n                        False)\n  --init-dest, --no-init-dest\n                        drop and recreate the target database before restoring\n                        into it (default: True)\n  --owner, --no-owner   Output commands to set ownership of objects to match\n                        the original database. When enabled pg_restore issues\n                        ALTER OWNER or SET SESSION AUTHORIZATION statements to\n                        set ownership of created schema elements. (default:\n                        True)\n  --acl, --no-acl       Restore access privileges (via grant/revoke commands)\n                        (default: True)\n  --log-level {CRITICAL,ERROR,WARNING,INFO,DEBUG,NOTSET}\n                        log level to use when writing to the console (default:\n                        'INFO')\n  --log-dir LOG_DIR     directory in which to write log files (default: None)\n  --source-host SOURCE_HOST\n                        network address of source database server (default:\n                        'localhost')\n  --source-port SOURCE_PORT\n                        network port number of source database server\n                        (default: 5432)\n  --source-username SOURCE_USERNAME\n                        username to use when authenticating with source\n                        database server (default: 'postgres')\n  --source-password SOURCE_PASSWORD\n                        password to use when authenticating with source\n                        database server (default: 'postgres')\n  --source-name SOURCE_NAME\n                        name of database to connect to on the source database\n                        server (default: 'postgres')\n  --dest-host DEST_HOST\n                        network address of dest database server (default:\n                        'dest')\n  --dest-port DEST_PORT\n                        network port number of dest database server (default:\n                        5432)\n  --dest-username DEST_USERNAME\n                        username to use when authenticating with dest database\n                        server (default: 'postgres')\n  --dest-password DEST_PASSWORD\n                        password to use when authenticating with dest database\n                        server (default: 'postgres')\n  --dest-name DEST_NAME\n                        name of database to connect to on the dest database\n                        server (default: 'postgres')\n```\n\n## Environment Variables\n\n| Env. Var          | Info                                                             |\n|-------------------|------------------------------------------------------------------|\n| `DEST_HOST`       |  network address of dest database server                         |\n| `DEST_PORT`       |  network port number of dest database server                     |\n| `DEST_USERNAME`   |  username to use when authenticating with dest database server   |\n| `DEST_PASSWORD`   |  password to use when authenticating with dest database server   |\n| `DEST_NAME`       |  name of database to connect to on the dest database server      |\n| `SOURCE_HOST`     |  network address of source database server                       |\n| `SOURCE_PORT`     |  network port number of source databaseserver                    |\n| `SOURCE_USERNAME` |  username to use when authenticating with source database server |\n| `SOURCE_PASSWORD` |  password to use when authenticating with source database server |\n| `SOURCE_NAME`     |  name of database to connect to on the source database server    |\n| `LOG_DIR`         |  directory in which to write log files                           |\n| `LOG_LEVEL`       |  log level to use when writing to the console                    |\n| `OWNER`           |  whether to output commands to set ownership of objects          |\n| `ACL`             |  whether to apply access privileges (via grant/revoke commands)  |\n| `CLEAN_DEST`      |  whether to first DROP all the restored objects in the dest db   |\n| `INIT_DEST`       |  whether (re)create the dest database before restoring           |\n\n\n## compose example\n\nThis container is intended to be deployed with Docker Compose (or something like Kubernetes). Here's a compose example:\n\n```yaml\nservices:\n  pgxfer:\n    image: backplane/pgxfer:1\n    environment:\n      SOURCE_HOST: \"sourcehost\"\n      SOURCE_PORT: \"5432\"\n      SOURCE_USERNAME: \"dbadmin\"\n      SOURCE_PASSWORD: \"egg$.ample.Passw0r7\"\n      SOURCE_NAME: \"newpostgres\"\n      DEST_HOST: \"desthost\"\n      DEST_PORT: \"5432\"\n      DEST_USERNAME: \"postgres\"\n      DEST_PASSWORD: \"hunter2\"\n      DEST_NAME: \"postgres\"\n      LOG_DIR: \"/log\"\n      LOG_LEVEL: \"DEBUG\"\n    restart: no\n    volumes:\n      - \"./log:/log\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbackplane%2Fpgxfer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbackplane%2Fpgxfer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbackplane%2Fpgxfer/lists"}