{"id":15067318,"url":"https://github.com/leonvogt/remote_database_importer","last_synced_at":"2026-01-27T17:04:16.820Z","repository":{"id":61961780,"uuid":"555884042","full_name":"leonvogt/remote_database_importer","owner":"leonvogt","description":"Dump remote databases and import locally","archived":false,"fork":false,"pushed_at":"2025-05-25T17:15:28.000Z","size":764,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-11T23:11:42.591Z","etag":null,"topics":["postgres","rubygem"],"latest_commit_sha":null,"homepage":"https://rubygems.org/gems/remote_database_importer","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/leonvogt.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2022-10-22T15:03:06.000Z","updated_at":"2025-09-19T01:25:55.000Z","dependencies_parsed_at":"2024-01-08T11:52:55.796Z","dependency_job_id":null,"html_url":"https://github.com/leonvogt/remote_database_importer","commit_stats":null,"previous_names":["leonvogt/remote_database_importer","leon-vogt/remote_database_importer"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/leonvogt/remote_database_importer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leonvogt%2Fremote_database_importer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leonvogt%2Fremote_database_importer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leonvogt%2Fremote_database_importer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leonvogt%2Fremote_database_importer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leonvogt","download_url":"https://codeload.github.com/leonvogt/remote_database_importer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leonvogt%2Fremote_database_importer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28816573,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T12:25:15.069Z","status":"ssl_error","status_checked_at":"2026-01-27T12:25:05.297Z","response_time":168,"last_error":"SSL_read: 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":["postgres","rubygem"],"created_at":"2024-09-25T01:19:37.704Z","updated_at":"2026-01-27T17:04:16.804Z","avatar_url":"https://github.com/leonvogt.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RemoteDatabaseImporter\n**RemoteDatabaseImporter** is a small gem with one specific reason to exist: Dump remote databases and import it locally.\n\n**This gem is currently in beta phase!**  \nIts well possible that unexpected errors can occur.\n\n## Features\n- Define multiple environments (such as staging, production etc.)\n- Rails intergration via rake task\n- Define custom commands that should run after successful import\n- Decide for yourself if the dump should be done over ssh or if pg_dump should connect to the DB port directly\n- It can therefore be used for almost all hosting providers (Heroku, Kubernetes, self-hosted, etc.)\n\n## Installation\n\nAdd this line to your application's gemfile:\n\n```ruby\ngem 'remote_database_importer'\n```\n\nAnd then execute:\n\n    $ bundle install\n\nOr install it yourself as:\n\n    $ gem install remote_database_importer\n\n## Usage\nWhenever you want current live data, you can run the command:\n\n```ruby\nrake remote_database:import\n```\n\n![Import-Job sample](readme_assets/import-job.gif)\n\n### Config\nThe settings for the different environments is stored in the `remote_database_importer.yml` file.  \nWhen you first run the rake task, it will dynamically create this file for you.\n\n\n![Config sample](readme_assets/config_sample.png)\n\n### DB Access\nThe dump of the remote database happens with the tool: [pg_dump](https://www.postgresql.org/docs/current/app-pgdump.html). \nThere are two opions for connecting to the remote databse:\n- pg_dump connects directly to the databse\n- pg_dump connects through a shh tunnel to the databse\n\nThe effective dump call is as follows:\n```ruby\n\"ssh SSH_USER@HOST -p SSH_PORT 'pg_dump -Fc -U DB_USER -d DB_NAME -h localhost -C' \u003e DB_DUMP_LOCATION\"\nor\n\"pg_dump -Fc 'host=HOST dbname=DB_NAME user=DB_USER port=POSTGRES_PORT' \u003e DB_DUMP_LOCATION\"\n```\n\n### Password Input\nBecause this gem doesn't store passwords you will have to enter the passwords manually during the rake task.  \nDepending on the choosen connection model the password prompt will be for the ssh connection or the DB access.  \nIf you choose to dump the databse over an ssh_tunnel, the easiest way will be to exchange your ssh-key with the server beforehand, so you don't have to enter a password.  \n\n## Limitations\n- At the moment only Postgres databases are supported\n- It has to run inside a Rails app.\n- Not suitable for very large databases, you could run into SSH timeouts\n\n## Contributing\n\nBug reports and pull requests are very welcome!\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleonvogt%2Fremote_database_importer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleonvogt%2Fremote_database_importer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleonvogt%2Fremote_database_importer/lists"}