backup mysql with compression and encryption to email account
Nice little script to automate mysql dump and backup to a remote server, in this case google mail, with encryption of the content, there should be no problem storing sensitive information on your gmail account.
Gmail, GPG, and Backups via Email
#!/bin/bash DATE=`date %F-%R`; BZFILE=/tmp/$DATE.sql.bz2; GPGFILE=$BZFILE.gpg; mysqldump --all-databases | bzip2 -c --best > $BZFILE; gpg --encrypt -r me@example.com $BZFILE; echo 'MySQL backup from abominus is attached' | mutt -a $GPGFILE \ -s '[backup] MySQL backup' self@gmail.com rm $GPGFILE;
0 TrackBacks
Listed below are links to blogs that reference this entry: backup mysql with compression and encryption to email account.
TrackBack URL for this entry: http://kennethhunt.com/mt/mt-tb.cgi/1836