S3 for Backup

I use S3 for all kind of backup purpose, assuming S3 will be always available and the data/files are secure. Amazon offers a encryption of storage, but at the end of the day they are in control and not you. This encryption is rendered useless the moment someone picks up your AWS keys (I am not jumping into more paranoid scenarios covered under the Patriot Act where the US government may access your data, since Amazon is an US based company). I prefer to encrypt at the source, here a 2-liner to add to your backup procedure (Linux). You can even combine this with a cronjob including the S3 transfer using the S3cmd toolkit.

Encrypt on the fly:
tar cz whichfile | openssl des3 -salt -out whichfile.tar.gz.enc -k mysecretpassword

Decrypt and uncompress:
openssl des3 -d -salt -in whichfile.tar.gz.enc -out whichfile.tar.gz -k mysecretpassword
tar -xf whichfile.tar.gz



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s