
Security News
Package Maintainers Call for Improvements to GitHub’s New npm Security Plan
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Fire-and-forget SQL backups of Amazon Web Services' RDS databases into S3.
A REST-style web service and middleware library for safely dumping the contents of a live AWS Relational Database Service instance into a compressed SQL file.
The service has only one API call (a POST to /api/v1/backups
), which spawns
a long-running worker process. The worker performs the following steps:
Safely and consistently grabbing the contents of a loaded, live RDS instance is a pain (if it has no existing slave). Though the steps are simple, they're brittle, slow, and involve lots of waiting for indeterminate time periods.
First install the dependencies:
The RDS Backup Service can be installed as a standalone application or as a Rack middleware library.
Install project dependencies, fetch the code, and bundle up.
gem install rake bundler
git clone https://github.com/benton/rds_backup_service.git
cd rds_backup_service
bundle
Install the gem, or add it as a Bundler dependency and bundle
.
gem install rds_backup_service
Require the middleware from your Rack application, then insert it in the stack:
require 'rds_backup_service' ... config.middleware.use RDSBackup::Service # (Rails application.rb) # or use RDSBackup::Service # (Sinatra)
If desired, require the SecurityGroup setup task in your Rakefile
:
require 'rds_backup_service/tasks'
Two configuration files are required (see included examples):
./config/accounts.yml
or ENV['RDS_ACCOUNTS_FILE']
This file defines three different types of AWS accounts: the various RDS
accounts to grab SQL from; the S3 account where the SQL output
will be written; and an optional EC2 account, which is used by the
setup:rds_backup_groups
rake task to perform post-configuration setup.
./config/settings.yml
or ENV['RDS_SETTINGS_FILE']
This file defines the S3 bucket name for the output, plus some other options.
Once these files have been edited, run rake setup:rds_backup_groups
, which:
The service is run in the standard Rack manner:
bundle exec rackup
The entry point for the REST API is /api/v1/backups
(See the {file:API.md API documentation})
The Resque workers are run with:
QUEUE=backups rake resque:work
The library (though not the service) can be used with DelayedJob. Place some code like this in your Controller or Model:
require 'rds_backup_service'
...
job = RDSBackup::Job.new(params[:rds_id])
job.write_to_s3
Delayed::Job.enqueue RDSBackup::DelayedJob.new(job.rds_id, {
backup_id: job.backup_id,
requested: job.requested.to_s,
email: params[:email],
})
FAQs
Unknown package
We found that rds_backup_service 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
Maintainers back GitHub’s npm security overhaul but raise concerns about CI/CD workflows, enterprise support, and token management.
Product
Socket Firewall is a free tool that blocks malicious packages at install time, giving developers proactive protection against rising supply chain attacks.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.