{"id":20698172,"url":"https://github.com/fly-apps/postgres-migrator","last_synced_at":"2025-05-10T18:31:35.453Z","repository":{"id":43408221,"uuid":"416896039","full_name":"fly-apps/postgres-migrator","owner":"fly-apps","description":"Fly app that works to streamline Postgres migrations.","archived":true,"fork":false,"pushed_at":"2023-03-04T02:29:19.000Z","size":37,"stargazers_count":13,"open_issues_count":3,"forks_count":2,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-03-11T03:39:59.064Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","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/fly-apps.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-13T20:59:06.000Z","updated_at":"2024-02-22T02:14:43.000Z","dependencies_parsed_at":"2024-11-17T00:36:16.236Z","dependency_job_id":null,"html_url":"https://github.com/fly-apps/postgres-migrator","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/fly-apps%2Fpostgres-migrator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fly-apps%2Fpostgres-migrator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fly-apps%2Fpostgres-migrator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fly-apps%2Fpostgres-migrator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fly-apps","download_url":"https://codeload.github.com/fly-apps/postgres-migrator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253463664,"owners_count":21912867,"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-11-17T00:23:20.044Z","updated_at":"2025-05-10T18:31:35.216Z","avatar_url":"https://github.com/fly-apps.png","language":"Dockerfile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# postgres-migrator\n\n**This project is deprecated in favor of: [Postgers Importer](https://github.com/fly-apps/postgres-importer)**\n\n\n\n## How it works\n\nPerforms a `pg_dump` against a source database and restores it into the specified target.\n\n## Performing the migration\n\n1. Clone this project and update the Dockerfile's `PG_VERSION` to match the version of your target Postgres cluster.\n\n2. Run `fly apps create --name postgres-migration-tool`\n\n3. Specify the `SOURCE_DATABASE_URI` and `TARGET_DATABASE_URI` as secrets.\n```shell\n# The source postgres database.\nfly secrets set SOURCE_DATABASE_URI=postgres://\u003cuser\u003e:\u003cpassword\u003e@\u003chostname\u003e:\u003cport\u003e/\u003cdatabase\u003e\n\n# The target postgres database ( Leave off the database name unless the database already exists ).\nfly secrets set TARGET_DATABASE_URI=postgres://\u003cuser\u003e:\u003cpassword\u003e@\u003chostname\u003e:\u003cport\u003e\n```\n\n4. Deploy app\n```\nfly deploy\n```\n\n5. Read the recommendations section below. :)\n\n6. Initiate the migration process\n```\nfly ssh console -C \"migrate\"\n```\n\n## Recommendations\n\n\n* Make sure the target app has plenty of memory.\n* Scale your destination app down to 1 before initiating the migration: `fly scale count 1 -a target-db-name`. It might warn you that this app name is different than what's in the current fly.toml, but that's ok\n* If the migration looks like it has frozen, connect to your target postgres app and run  `\\l+` a few times to make sure the data size is still growing.\n* If migration connection is broken, your target app is likely under scaled.  Monitor your metrics dashboard and your Fly app's vm checks for guidance.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffly-apps%2Fpostgres-migrator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffly-apps%2Fpostgres-migrator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffly-apps%2Fpostgres-migrator/lists"}