[mythtv-users] I am an idiot - deleted everything without DB backup - a question...

Ryan Steffes rbsteffes at gmail.com
Wed Sep 12 04:22:53 UTC 2007


On 9/8/07, John Drescher <drescherjm at gmail.com> wrote:
> > Oh, and I have to get myself a backup command to automatically put a
> > backup somewhere else on the network. That or don't do Myth rebuilds
> > when I haven't had enough sleep....
> >
>
> I make a backup my mythtv database every night with a cron job:
>
> # cat /etc/cron.daily/mythtv.cron
> #! /bin/sh
> mkdir -p /var/backup/mythtv
> /usr/bin/mysqldump -u mythtv mythconverg | /bin/bzip2 -c >
> /var/backup/mythtv/mythtv-`date +%F`.bz2
>
> John
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>


Nice and simple, but I couldn't help but realize that a perfect ending
to that script is to let gmail do my offsite back up for me (using
some scripting I swiped off a friendly google search):

#! /bin/bash
mkdir -p /var/backup/mythtv
/usr/bin/mysqldump -u mythtv -pmythtv mythconverg | /usr/bin/bzip2 -c
> /var/backup/mythtv/mythtv-`date +%F`.bz2
mimesend -t "YOU at gmail.com" -s "MYSQL Backup ( /mythtv-`date +%F`.bz2
)" -f /var/backup/mythtv/mythtv-`date +%F`.bz2

Cause I figure google would WAN T me to store all my information there.  Right?

Ry


More information about the mythtv-users mailing list