<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:"Cambria Math";
        panose-1:0 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.gmailquote
        {mso-style-name:gmail_quote;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>

<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
mythtv-users-bounces@mythtv.org [mailto:mythtv-users-bounces@mythtv.org] <b>On
Behalf Of </b>Craig Huff<br>
<b>Sent:</b> Saturday, September 08, 2007 9:26 PM<br>
<b>To:</b> Discussion about mythtv<br>
<b>Subject:</b> Re: [mythtv-users] Backing up mysql database.<o:p></o:p></span></p>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>On 9/8/07, <b>Marc</b> &lt;<a
href="mailto:drayson@net1plus.com">drayson@net1plus.com</a>&gt; wrote:<o:p></o:p></p>

<div>

<blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;
margin-left:4.8pt;margin-right:0in'>

<p class=MsoNormal>&lt;snip&gt;<o:p></o:p></p>

</blockquote>

<div>

<p class=MsoNormal>&nbsp;<o:p></o:p></p>

</div>

<blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;
margin-left:4.8pt;margin-right:0in'>

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

</blockquote>

<blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;
margin-left:4.8pt;margin-right:0in'>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

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

</blockquote>

<div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

</div>

<blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;
margin-left:4.8pt;margin-right:0in'>

<p class=MsoNormal>Marc<o:p></o:p></p>

</blockquote>

</div>

<p class=MsoNormal><br>
Marc,<br>
<br>
Looks like you smooshed two lines together.&nbsp; Try inserting a linefeed
between &quot;${BACKFILE}&quot; and &quot;if&quot;.<br>
<br>
The &quot;e&quot; gzip is complaining about is in &quot;-ne&quot;.&nbsp;
Without looking at the man page for gzip, I'm betting that -n is a legitimate
option for gzip. <br>
<br>
Nice to know I'm not the only one with fat fingers. ;-)<br>
<br>
Craig.<o:p></o:p></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Strange.. Those line feeds never showed up in my original
message.<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Thanks<o:p></o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Marc<o:p></o:p></span></p>

</div>

</body>

</html>