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_laterTo restore a database:
$ bin/rails restore:[database_name]Installation
Add this line to your Gemfile:
gem "sqlite_backups"And then execute:
$ bundleThen run the installer to copy over the migration and mount a route we use for restoring:
$ bin/rails backups:installThese are the available configuration options:
config.backups.storage_service = :backups
config.backups.retention = 1.dayThe storage_service value points to a defined ActiveStorage service.
License
The gem is available as open source under the terms of the MIT License.