An open API service indexing awesome lists of open source software.

https://github.com/npezza93/sqlite_backups


https://github.com/npezza93/sqlite_backups

Last synced: 30 days ago
JSON representation

Awesome Lists containing this project

README

        

# SqliteBackups

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

## Usage

To backup a database:
```bash
$ bin/rails backup:[database_name]
```

Alternatively, you can use a job:
```ruby
Backups::DatabaseJob.perform_later(database_name)
Backups::AllJob.perform_later
```

To restore a database:
```bash
$ bin/rails restore:[database_name]
```

## Installation
Add this line to your Gemfile:

```ruby
gem "sqlite_backups"
```

And then execute:
```bash
$ bundle
```

Then run the installer to copy over the migration and mount a route we use for
restoring:
```bash
$ bin/rails backups:install
```

These are the available configuration options:

```ruby
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](https://opensource.org/licenses/MIT).