Quick And Dirty Encrypted Backups Under Any Operating System

This strategy will create one big .tar.gz file wrapped in an aes256 security blanket.  You'll need tar, gzip, and Gnu Privacy Gard installed to do this.  Make sure that you are backing up to a file system that can support large files such as EXT3 or NTFS because that one file could get pretty big.

Assuming I am going to backup /media/hd1 to /media/hd2/backup.tar.gz.gpg
$ cd /media
$ tar czvpf - hd1/ | gpg --symmetric --cipher-algo aes256 -o /media/HD2/backup.tar.gz.gpg
Enter password twice, and then wait a few hours.
Put a copy of this note in the form of a text file on the drive as well so you can remember how to unpack it.

To Restore from /media/path/to/backup/backup.tar.gz.gpg to /media/blankDrive/ :
$ cd /media/blankDrive
$ gpg -d /media/path/to/backup/backup.tar.gz.gpg | tar xzvf -

Enter password twice, wait a few hours.  Note, the result here will be /media/blankDrive/hd1/...  so, you might want to move everything to .. when you are done or alter the command slightly to accommodate.

Source.

No comments

Post a Comment