0.0
No release in over 3 years
Simple sqlite backup for Rails
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Runtime

>= 0
>= 8.0.2
 Project Readme

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

The storage_service value points to a defined ActiveStorage service.

License

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