SqliteBackups

A dead simple Rails engine to backup your Sqlite databases utilizing Active Storage.

Usage

To backup a database:

$ bin/rails backup:[database_name]

Alternatively, you can use a job:

Backups::DatabaseJob.perform_later(database_name)
Backups::AllJob.perform_later

To restore a database:

$ bin/rails restore:[database_name]

Installation

Add this line to your Gemfile:

gem "sqlite_backups"

And then execute:

$ bundle

Then run the installer to copy over the migration and mount a route we use for restoring:

$ bin/rails backups:install

These are the available configuration options:

config.backups.storage_service = :backups
config.backups.retention = 1.day

License

The gem is available as open source under the terms of the MIT License.