https://github.com/npezza93/sqlite_backups
https://github.com/npezza93/sqlite_backups
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/npezza93/sqlite_backups
- Owner: npezza93
- License: mit
- Created: 2025-04-30T21:10:33.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-04T19:42:45.000Z (about 1 year ago)
- Last Synced: 2025-05-07T11:59:16.943Z (about 1 year ago)
- Language: HTML
- Size: 73.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: MIT-LICENSE
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).