Automated encrypted backups to megaupload.
I’ve written a little script to automatically upload a backup of a folder i want, to megaupload.It encrypts the file by using gpg standards, then uploads the file using plowshare. It also creates a filecalled ~/Dropbox/Backup.txt, which stores a record of each and every backup. Including the md5 hash of the encrypted file.Since i have a free account in Megaupload, i store backups for 90 days.. after which it will be dead, but who needs backups older than 90 days right?
Safe, Secure and Easy.
#!/bin/bash #Written by unhackmunhackmee.wordpress.com USR=#Username PASS=#Pass Recipientfirstname.lastname@example.org Record=~/Dropbox/Backups.txt #Set folder to ""; to nullify FOLDER=""; if [ $# -ne "0" ];then FOLDER=$1; else if [ -z $FOLDER ];then echo ERROR! No input files! && exit; fi fi DATE=`date +%d%m%y-%H%M` gpg-zip --recipient $Recipient --encrypt --output /tmp/$DATE.pgp $FOLDER MeURL=`plowup -a $USR:$PASS /tmp/$DATE.pgp megaupload` MD5=`md5sum /tmp/$DATE.pgp` echo -e "$MD5\t$MeURL\t`date +%D-%H:%M`\t$FOLDER" >> $Record echo >> $Record
im thinking of adding this to the cron tab, but the thing has to be run as a normal user,
(doesn’t need root powers)- i haven’t done so because gnome & unity- both seem too oft to
crash on me.btw, you need plowshare and gpg installed, and the recipient’s key should be trusted, or gpg prompts to warn you.