How do I do my Backups ====================== So everyboy knows or should know that backing up your data is important. And as I am currently rebuilding my whole IT infrasturcture (Notebooks, Workstation, Servers, and so on) I was thinking about a new and easy way of backing up my data in a secure way. The key features should be: - standard Unix tools - standard Unix concepts (pipes) - strong crypto I ended up with a simple alias: alias backmeup='tar -cv ${HOME}/bin/ ${HOME}/documents/ ${HOME}/templates/ ${HOME}/.gnupg/ ${HOME}/.ssh/ ${HOME}/.bashrc | gpg -r bfr@sdf.org -e -a > ${HOME}/backup/$(date -I)_backup_of_$(hostname)_home_${USER}.tar.asc' What is does is really simple. It takes the important files and folders of my $HOME, encrypts it with my OpenPGP key, and than saves it to my backup directoy as an ascii file. As my OpenPGP key is stored on an OpenPGP smartcard and some CDs at different places, I don't worry about losing it. But the best backup plans are worthless if you are not able to recover your data. So it is really important to test your backup. So let's test my backup of today: First list all files in the archive: $ gpg -d ${HOME}/backup/2014-08-22_backup_of_lonestar_home_bfr.tar.asc | tar -tv Now let's extract just my .bashrc to a tmp folder: $ mkdir tmp $ cd tmp/ $ gpg -d ${HOME}/backup/2014-08-22_backup_of_lonestar_home_bfr.tar.asc | tar -x .bashrc So last but not least a full restore. $ cd $HOME $ gpg -d ${HOME}/backup/2014-08-22_backup_of_lonestar_home_bfr.tar.asc | tar -xv So as I am useing really strong cryptographie I can simply store the backups at different locations e.g. in a Dropbox, on an USB drive, the NAS at my office or as it is plain text I could even print it out.