{"id":14974098,"url":"https://github.com/kirillshevch/pg_drive_backup","last_synced_at":"2025-09-17T19:31:00.939Z","repository":{"id":50704213,"uuid":"105869830","full_name":"kirillshevch/pg_drive_backup","owner":"kirillshevch","description":"Simple solution to make encrypted with ccrypt PostgreSQL backups and storing on Google Drive API","archived":false,"fork":false,"pushed_at":"2021-03-25T03:25:32.000Z","size":20,"stargazers_count":32,"open_issues_count":4,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-24T09:33:24.336Z","etag":null,"topics":["backup","ccrypt","google-drive","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kirillshevch.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}},"created_at":"2017-10-05T09:08:05.000Z","updated_at":"2024-08-29T19:35:44.000Z","dependencies_parsed_at":"2022-09-01T23:21:29.755Z","dependency_job_id":null,"html_url":"https://github.com/kirillshevch/pg_drive_backup","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/kirillshevch/pg_drive_backup","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kirillshevch%2Fpg_drive_backup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kirillshevch%2Fpg_drive_backup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kirillshevch%2Fpg_drive_backup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kirillshevch%2Fpg_drive_backup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kirillshevch","download_url":"https://codeload.github.com/kirillshevch/pg_drive_backup/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kirillshevch%2Fpg_drive_backup/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275649815,"owners_count":25503212,"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-17T02:00:09.119Z","response_time":84,"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","ccrypt","google-drive","postgresql","ruby"],"created_at":"2024-09-24T13:49:57.135Z","updated_at":"2025-09-17T19:31:00.665Z","avatar_url":"https://github.com/kirillshevch.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PgDriveBackup\n\nSimple solution to make encrypted with [ccrypt](http://ccrypt.sourceforge.net/) PostgreSQL backups and storing on [Google Drive API](https://github.com/gimite/google-drive-ruby)\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'pg_drive_backup'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install pg_drive_backup\n\n## Usage\n\n### Quick start\n\nRequired database config credentials: \n\n`config/initializers/pg_drive_backup.rb`\n```ruby\nPgDriveBackup::Settings.configure do |config|\n  config.database.name = 'database_name'\n  config.database.user = ENV.fetch('PG_USERNAME')\n  config.database.password = ENV.fetch('PG_PASSWORD')\nend\n```\n\nAdd your google drive [authorization](https://github.com/gimite/google-drive-ruby/blob/master/doc/authorization.md) JSON file to `config/drive.json`\n\nGenerate your encryption key, for example:\n```bash\nopenssl passwd -1 \"somepassword\"\n```\n\nAnd put it into `config/key.txt`\n\nRun it:\n```ruby\nPgDriveBackup::Run.call\n```\n\nIt uploads your encrypted backup with name like `20171009083306693-dump.sql.cpt`\n\nTo decrypt:\n```bash\nccrypt -k config/key.txt -d 20171009083306693-dump.sql.cpt\n```\n\n### Tunning\n\nConfig options:\n\n```ruby\nPgDriveBackup::Settings.configure do |config|\n  config.credentials_path = 'config/drive.json'       # default: 'config/drive.json'\n  config.key_path = 'config/key.txt'                  # default: 'config/key.txt'\n  config.prefix = '-dump'                             # default: '-dump'\n\n  config.database.name = 'database_name'              # default: nil\n  config.database.user = ENV.fetch('PG_USERNAME')     # default: nil\n  config.database.password = ENV.fetch('PG_PASSWORD') # default: nil\n  config.database.host = 'localhost'                  # default: 'localhost'\nend\n```\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/kirillshevch/pg_drive_backup.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkirillshevch%2Fpg_drive_backup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkirillshevch%2Fpg_drive_backup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkirillshevch%2Fpg_drive_backup/lists"}