https://github.com/roxasshadow/edb
A framework to make and manage backups of your database
https://github.com/roxasshadow/edb
Last synced: 5 months ago
JSON representation
A framework to make and manage backups of your database
- Host: GitHub
- URL: https://github.com/roxasshadow/edb
- Owner: RoxasShadow
- Created: 2015-06-21T20:57:06.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2015-10-19T12:43:30.000Z (almost 11 years ago)
- Last Synced: 2025-05-07T16:09:14.567Z (about 1 year ago)
- Language: Ruby
- Homepage:
- Size: 386 KB
- Stars: 105
- Watchers: 6
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Backup, encrypt and manage your database
*EDB* is a framework to make and manage backups of your database.
It is composed by three macro areas that reflect themself inside `edb.yml` and are *DBMS*, *CRYPTOGRAPHY* and *STORAGE*.
The first one deals with the actual backup process of your database. The second one will eventually encrypt the backup copies you made and the last one will copy them somewhere (S3 bucket, your local filesystem, etc.).
**tl;dr** Make (optionally) ciphered backups of your database(s) and then upload them via FTP and Amazon S3 (or just keep them in your server).
## Install
`$ gem install edb`
## Run
Customize `example/edb.yml` (remember also to change the `secret` by running `$ edb -k`) and then:
`$ edb example/edb.yml`
To decrypt the encrypted files:
`$ edb example/edb.yml -d [FILE]`
Consider also to add *EDB* to your cronjobs.
## Available modules
- *Cryptography*: `AES_256_CBC`
- *DBMS*: `PostgreSQL`, `MySQL`
- *Storage*: `S3`, `Filesystem`, `FTP`
## FAQ
**Q:** What if I want to dump two or three MySQL databases?
*A:* Just add a `:MySQL:` block for every database you need to dump.
**Q:** What if I want to save a database to S3 and another one into my local filesystem?
*A:* Well, you can't. By design, every macro-block (like, `:DBMS:`) is unaware of the other ones. So, for instance, I couldn't ask `:Filesystem:` to work only for the first `:MySQL:` block since it actually does not know what a `:MySQL:` block is. You need just to create two configuration files.
**Q:** Is there something to run it automatically at every night? Let's say 2:30am
*A:* Cronjobs to the rescue. Append the following line to your `crontab -e`: ```30 2 * * * bash -l -c '`which edb` /home/deployer/edb.yml'```.