[mythtv-users] Backing up mysql database.

Craig Huff huffcslists at gmail.com
Sun Sep 9 01:26:04 UTC 2007


On 9/8/07, Marc <drayson at net1plus.com> wrote:
>
> <snip>



> Edit the script as needed.
>
> #! /bin/bash
> #
> # Created on 3/22/2006 by sdkovacs
> # Script: mythbackup
> #
> #
> #
> #
> ########################################################
> BACKFILE="/home/mythtv/mythbackup.`date +%a`.sql.gz"
>
>
> mysqldump -u mythtv -pmythtv mythconverg -c | gzip -c > ${BACKFILE}
> if [ $? -ne "0" ]
> then
>         echo "Mythtv database backup failed! Exiting..."
>         exit 1
> fi
>
> cp ${BACKFILE} /videos/backup/myth
> _______________________________________________
> <snip>


#! /bin/bash
> #
> # Created on 3/22/2006 by sdkovacs
> # Updated on 9/8/2007 by Marc
> # Script: mythbackup
> #
> #
> #
> ########################################################
> BACKFILE="/record/mythbackup.`date +%a`.sql.gz"
>
>
> mysqldump -u mythtv -pmythtv mythconverg -c | gzip -c > ${BACKFILE} if [
> $?
> -ne "0" ] then
>         echo "Mythtv database backup failed! Exiting..."
>         exit 1
> fi
>
> <snip>


Marc
>

Marc,

Looks like you smooshed two lines together.  Try inserting a linefeed
between "${BACKFILE}" and "if".

The "e" gzip is complaining about is in "-ne".  Without looking at the man
page for gzip, I'm betting that -n is a legitimate option for gzip.

Nice to know I'm not the only one with fat fingers. ;-)

Craig.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mythtv.org/pipermail/mythtv-users/attachments/20070908/0d1ce631/attachment.htm 


More information about the mythtv-users mailing list