{"id":19110253,"url":"https://github.com/lucianghinda/backup-postgresql-db-remote","last_synced_at":"2025-09-08T07:31:10.696Z","repository":{"id":233725545,"uuid":"787700196","full_name":"lucianghinda/backup-postgresql-db-remote","owner":"lucianghinda","description":"A simple Ruby script to backup a PostgreSQL DB remote to Cloudflare R2","archived":false,"fork":false,"pushed_at":"2024-04-23T09:23:21.000Z","size":17,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-08T18:51:49.690Z","etag":null,"topics":["backup","postgresql","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lucianghinda.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-04-17T02:33:59.000Z","updated_at":"2024-07-15T12:06:08.000Z","dependencies_parsed_at":"2024-04-17T08:03:14.426Z","dependency_job_id":"8ae820ab-5938-46c2-81c4-19a4d7623521","html_url":"https://github.com/lucianghinda/backup-postgresql-db-remote","commit_stats":null,"previous_names":["lucianghinda/backup-postgresql-db-remote"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/lucianghinda/backup-postgresql-db-remote","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucianghinda%2Fbackup-postgresql-db-remote","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucianghinda%2Fbackup-postgresql-db-remote/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucianghinda%2Fbackup-postgresql-db-remote/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucianghinda%2Fbackup-postgresql-db-remote/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lucianghinda","download_url":"https://codeload.github.com/lucianghinda/backup-postgresql-db-remote/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lucianghinda%2Fbackup-postgresql-db-remote/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274152132,"owners_count":25231285,"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","status":"online","status_checked_at":"2025-09-08T02:00:09.813Z","response_time":121,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["backup","postgresql","ruby"],"created_at":"2024-11-09T04:24:17.347Z","updated_at":"2025-09-08T07:31:10.441Z","avatar_url":"https://github.com/lucianghinda.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# A simple script to backup a PostgreSQL DB to a Cloudflare R2 endpoint\n\n## How to use it\n\n### 1. Create an account on Cloudflare\n\n1. Go to https://www.cloudflare.com/developer-platform/r2/ and create an account\n2. Create a bucket in R2 (make sure it is not public)\n3. Go to \"Manage R2 API Tokens\" and generate a token for your own bucket. Keep that around to add it to your environment variables\n\n### 2. Configure environment variables\n\nConfigure your environment with environment variables that are shown in `.env.sample`.\n\n```bash\ncp .env.sample .env\n```\n\n### 3. Install `pg_dump` on the machine where you will run this script\n\nInstall [pg_dump](https://www.postgresql.org/docs/current/app-pgdump.html) on the machine where you plan to run this script\n\n### 4. Configure password for the user that will be used to connect to PostgreSQL\n\npg_dump does not allow to directly specify the password.\n\nSo you should configure the password using `.pgpass` file.\n\n### 4. Run the script\n\n```bash\nbundle exec ruby run.rb --name DB_NAME`\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucianghinda%2Fbackup-postgresql-db-remote","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flucianghinda%2Fbackup-postgresql-db-remote","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flucianghinda%2Fbackup-postgresql-db-remote/lists"}