28 January 2009

backup_fu with zip and password encryption support

backup_fu is known as a convinient method to backup databases and static files for rails apps. Here is the original post from the creator.

I forked it today and added zip support and passwort encryption for zip archives.

The passwort encryption is considered weak. From the zip man page:


Use password to encrypt zipfile entries (if any). THIS IS INSECURE! Many multi-user operating systems provide ways for any user to see the current command line of any other user; even on stand-alone systems there is always the threat of over-the-shoulder peeking. Storing the plaintext password as part of a command line in an automated script is even worse. Whenever possible, use the non-echoing, interactive prompt to enter pass-words. (And where security is truly important, use strong encryption such as Pretty Good Privacy instead of the relatively weak encryption provided by standard zipfile utilities.)


You have been warned!


Install the right_aws gems with

sudo gem install right_aws

Install backup_fu with

script/plugin install git://github.com/bigcurl/backup_fu.git

Add this to your config file to enable zip and password encryption:


zip-password: your-super-secret-password
compressor: zip


See backup_fu use zip and encrypt your files before uploading it to Amazon S3.