backup mysql with compression and encryption to email account

| | TrackBacks (0)

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

About this Entry

This page contains a single entry by klsh published on June 7, 2007 10:07 AM.

google gears for offline ads was the previous entry in this blog.

Textmate for Linux: Modify Gedit to look and act like is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.