Project

edb

0.04
No commit activity in last 3 years
No release in over 3 years
EDB aims to be a framework to make and manage backups of your database.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
 Dependencies

Runtime

= 1.59.1
~> 0.4
~> 0.2
 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'.