
Security News
Astral Launches pyx: A Python-Native Package Registry
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Simple solution to make encrypted with ccrypt PostgreSQL backups with storing on Google Drive API
Add this line to your application's Gemfile:
gem 'pg_drive_backup'
And then execute:
$ bundle
Or install it yourself as:
$ gem install pg_drive_backup
Required database config credentials:
config/initializers/pg_drive_backup.rb
PgDriveBackup::Settings.configure do |config|
config.database.name = 'database_name'
config.database.user = ENV.fetch('PG_USERNAME')
config.database.password = ENV.fetch('PG_PASSWORD')
end
Add your google drive authorization JSON file to config/drive.json
Generate your encryption key, for example:
openssl passwd -1 "somepassword"
And put it into config/key.txt
Run it:
PgDriveBackup::Run.call
It uploads your encrypted backup with name like 20171009083306693-dump.sql.cpt
To decrypt:
ccrypt -k config/key.txt -d 20171009083306693-dump.sql.cpt
Config options:
PgDriveBackup::Settings.configure do |config|
config.credentials_path = 'config/drive.json' # default: 'config/drive.json'
config.key_path = 'config/key.txt' # default: 'config/key.txt'
config.prefix = '-dump' # default: '-dump'
config.database.name = 'database_name' # default: nil
config.database.user = ENV.fetch('PG_USERNAME') # default: nil
config.database.password = ENV.fetch('PG_PASSWORD') # default: nil
config.database.host = 'localhost' # default: 'localhost'
end
Bug reports and pull requests are welcome on GitHub at https://github.com/kirillshevch/pg_drive_backup.
The gem is available as open source under the terms of the MIT License.
FAQs
Unknown package
We found that pg_drive_backup demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.
Security News
The latest Opengrep releases add Apex scanning, precision rule tuning, and performance gains for open source static code analysis.