{"id":16265557,"url":"https://github.com/bruth/docker-pgcopy","last_synced_at":"2025-04-08T14:36:12.507Z","repository":{"id":34147943,"uuid":"37985194","full_name":"bruth/docker-pgcopy","owner":"bruth","description":"Copies a database from one server to another.","archived":false,"fork":false,"pushed_at":"2015-07-07T14:22:27.000Z","size":120,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-14T10:56:05.326Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bruth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-06-24T13:14:48.000Z","updated_at":"2015-06-24T13:22:13.000Z","dependencies_parsed_at":"2022-09-02T10:22:42.574Z","dependency_job_id":null,"html_url":"https://github.com/bruth/docker-pgcopy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bruth%2Fdocker-pgcopy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bruth%2Fdocker-pgcopy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bruth%2Fdocker-pgcopy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bruth%2Fdocker-pgcopy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bruth","download_url":"https://codeload.github.com/bruth/docker-pgcopy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247862049,"owners_count":21008616,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-10-10T17:09:38.875Z","updated_at":"2025-04-08T14:36:12.490Z","avatar_url":"https://github.com/bruth.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PostgreSQL Copy\n\nImage that runs a container for copying a database from one server to another.\n\n## Environment Variables\n\nBoth `SOURCE_*` and `TARGET_*` variables must be defined for the following parameters.\n\n- `HOST`\n- `PORT`\n- `USER`\n- `PASS`\n- `DB`\n\n## Usage\n\nThe most concise way is to create an environment file, such as `pgcopy.vars`:\n\n```\nSOURCE_HOST=192.168.59.103\nSOURCE_PORT=5433\nSOURCE_DB=postgres\nSOURCE_USER=postgres\nTARGET_HOST=192.168.59.103\nTARGET_PORT=5434\nTARGET_DB=postgres\nTARGET_USER=postgres\n```\n\nThen pass it to the `docker run` command. The target database will be automatically created if it does not exist.\n\n```\ndocker run --env-file=pg.vars bruth/pgcopy\n```\n\nAny additional arguments passed to the command will be added to the `pg_dump` command for the source database. This provides flexibility for specifying more fine-grain options such as selecting specific schemata or tables to dump, dropping existing tables, or creating the database. For example, this command will clean all objects in the target database before copying the new data.\n\n```\ndocker run --env-file=pg.vars bruth/pgcopy --clean --if-exists --schema=archive\n```\n\nSee the full reference of `pg_dump` options: http://www.postgresql.org/docs/9.4/static/app-pgdump.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbruth%2Fdocker-pgcopy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbruth%2Fdocker-pgcopy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbruth%2Fdocker-pgcopy/lists"}