Easy Linux backups with Backupninja

Spend 15 minutes to install and setup backupninja and go enjoing life (or trolling on imageboards;)

I've tried with 1-2 but found that this ways are not for me and suggesting the same decision to you. First of all install it with friends:

$sudo apt-get install backupninja duplicity rdiff-backup

Then have a look at: /usr/share/doc/backupninja/examples/ and copy your example to /etc/backup.d with the numbered and extensioned file name and edit it to suit your needs, for example to make daily bakcup of MySQL databases I have the following /etc/backup.d/50-dailyallbases.mysql file:

first number in filename defines order of script execution, if two or more scripts are scheduled at one time, the one prefixes with less number will be executed first and only when it's finished the second will start. This allows to have simple dependecy e.g. to deliver my backups to storage server I use another script /etc/backup.d/60-dailymydqldeliver.dup that uses duplicity to create backup of local catalog. Here is it's contents:

Pay attention to sshoptions directive, it's changed for newer versions, and old variant (from official docs with using -i key to use identity file) will not work. Also you probably should no start destdir with / in case you are not storing the data outside home of backup user. If you experiencing any problems with, feel free and brave to open helper files from /usr/share/backupninja/ and investigate how things are working.

So backup delivery will start atfter database backup is finished. Your should create user on your server and either give it paswordless access (with ssh certificates) or use scp for delivery.