<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: Automatic MySql Backup Script</title>
	<atom:link href="http://www.dagondesign.com/articles/automatic-mysql-backup-script/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dagondesign.com/articles/automatic-mysql-backup-script/</link>
	<description>WordPress Plugins, PHP Scripts, Tools, and Tutorials</description>
	<pubDate>Wed, 03 Dec 2008 23:00:28 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.1</generator>
		<item>
		<title>By: Scooter</title>
		<link>http://www.dagondesign.com/articles/automatic-mysql-backup-script/#comment-463612</link>
		<dc:creator>Scooter</dc:creator>
		<pubDate>Mon, 01 Dec 2008 01:41:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.dagondesign.com/articles/automatic-mysql-backup-script/#comment-463612</guid>
		<description>Ran this using php 4... works perfectly

My hosting company uses php5... tried the switch and it does not work....

Question : 

Is there a way to make this compatible for the latest version of php, if so how can this be accomplished..?

Thank you for your time.</description>
		<content:encoded><![CDATA[<p>Ran this using php 4&#8230; works perfectly</p>
<p>My hosting company uses php5&#8230; tried the switch and it does not work&#8230;.</p>
<p>Question : </p>
<p>Is there a way to make this compatible for the latest version of php, if so how can this be accomplished..?</p>
<p>Thank you for your time.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://www.dagondesign.com/articles/automatic-mysql-backup-script/#comment-463371</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Thu, 27 Nov 2008 19:26:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.dagondesign.com/articles/automatic-mysql-backup-script/#comment-463371</guid>
		<description>arjen, and others. I'm too using Windows and had the infamous 'Zip' error.

I can only speak from my experience of Winzip 12, but it appears winzip no-longer support command-line functions as standard, you have to download the 'WinZip Command Line Support Add-on' that only supports the 'Standard' &#38; 'Pro' versions (so you have to pay). Once you've installed WinZip 12 &#38; the Command Line Add-on you will still get the error....you have to copy the file 'WZZIP.EXE' to both the directory the script resides in AND the temp file that your backups are created in. 
You then have to change a couple of lines of code in the script to tell it to stop using the command 'ZIP' and start using 'WZZIP' (the code is set to always use 'ZIP' for windows systems regardless of what you put in the $COMPRESSOR variable:
&lt;code&gt;
Line 221 changes to:
exec( "wzzip $BACKUP_TEMP/$db.sql.zip $BACKUP_TEMP/$db.sql 2&gt;&#038;1" , $output, $res );

Line 256 changes to:
exec("wzzip $BACKUP_DEST/$BACKUP_NAME * 2&gt;&#038;1", $output, $res);
&lt;/code&gt;
That will get the code working with winzip the first time you run it, however, at the end of the script it tidies up the temp directory, so you'll need to tell that bit of the script to NOT delete the 'WZZIP.EXE' you just put there (probably a better way of doing this but this worked so meh):
&lt;code&gt;
Line 377 changes to:
if (!is_dir($file) AND $file != 'WZZIP.EXE') {
&lt;/code&gt;

I hope this helps anyone else with this problem.

P.S. Great script, thank you so much, saved me a lot of time writing my own :D</description>
		<content:encoded><![CDATA[<p>arjen, and others. I&#8217;m too using Windows and had the infamous &#8216;Zip&#8217; error.</p>
<p>I can only speak from my experience of Winzip 12, but it appears winzip no-longer support command-line functions as standard, you have to download the &#8216;WinZip Command Line Support Add-on&#8217; that only supports the &#8216;Standard&#8217; &amp; &#8216;Pro&#8217; versions (so you have to pay). Once you&#8217;ve installed WinZip 12 &amp; the Command Line Add-on you will still get the error&#8230;.you have to copy the file &#8216;WZZIP.EXE&#8217; to both the directory the script resides in AND the temp file that your backups are created in.<br />
You then have to change a couple of lines of code in the script to tell it to stop using the command &#8216;ZIP&#8217; and start using &#8216;WZZIP&#8217; (the code is set to always use &#8216;ZIP&#8217; for windows systems regardless of what you put in the $COMPRESSOR variable:<br />
<pre><code>
Line 221 changes to:
exec( "wzzip $BACKUP_TEMP/$db.sql.zip $BACKUP_TEMP/$db.sql 2&gt;&amp;1" , $output, $res );

Line 256 changes to:
exec("wzzip $BACKUP_DEST/$BACKUP_NAME * 2&gt;&amp;1", $output, $res);
</code></pre><br />
That will get the code working with winzip the first time you run it, however, at the end of the script it tidies up the temp directory, so you&#8217;ll need to tell that bit of the script to NOT delete the &#8216;WZZIP.EXE&#8217; you just put there (probably a better way of doing this but this worked so meh):<br />
<pre><code>
Line 377 changes to:
if (!is_dir($file) AND $file != 'WZZIP.EXE') {
</code></pre></p>
<p>I hope this helps anyone else with this problem.</p>
<p>P.S. Great script, thank you so much, saved me a lot of time writing my own <img src='http://www.dagondesign.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://www.dagondesign.com/articles/automatic-mysql-backup-script/#comment-463316</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Thu, 27 Nov 2008 06:58:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.dagondesign.com/articles/automatic-mysql-backup-script/#comment-463316</guid>
		<description>Nice work, thanks</description>
		<content:encoded><![CDATA[<p>Nice work, thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve</title>
		<link>http://www.dagondesign.com/articles/automatic-mysql-backup-script/#comment-463309</link>
		<dc:creator>Steve</dc:creator>
		<pubDate>Thu, 27 Nov 2008 02:05:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.dagondesign.com/articles/automatic-mysql-backup-script/#comment-463309</guid>
		<description>Does anyone know what to put for the $MYSQL_PATH variable if you're being hosted on bluehost.com?</description>
		<content:encoded><![CDATA[<p>Does anyone know what to put for the $MYSQL_PATH variable if you&#8217;re being hosted on bluehost.com?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jason</title>
		<link>http://www.dagondesign.com/articles/automatic-mysql-backup-script/#comment-462853</link>
		<dc:creator>Jason</dc:creator>
		<pubDate>Thu, 20 Nov 2008 06:45:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.dagondesign.com/articles/automatic-mysql-backup-script/#comment-462853</guid>
		<description>I'm using this only for the e-mail function, but am having an issue.  It dumps the db and compresses with no issue, then says it is e-mailing to the address I specified, but I never get an e-mail.  I have it set to delete after e-mailing, but upon checking via FTP, the backup files are still there (the tar is around 7 MB).  However, it works fine with my smaller database.  I'm sure this is an issue with the server (memory limit of some kind) and not the script, but is there anything I can do?  This is a webserver, and not a server that I have shell access to or anything.</description>
		<content:encoded><![CDATA[<p>I&#8217;m using this only for the e-mail function, but am having an issue.  It dumps the db and compresses with no issue, then says it is e-mailing to the address I specified, but I never get an e-mail.  I have it set to delete after e-mailing, but upon checking via FTP, the backup files are still there (the tar is around 7 MB).  However, it works fine with my smaller database.  I&#8217;m sure this is an issue with the server (memory limit of some kind) and not the script, but is there anything I can do?  This is a webserver, and not a server that I have shell access to or anything.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bob</title>
		<link>http://www.dagondesign.com/articles/automatic-mysql-backup-script/#comment-462577</link>
		<dc:creator>Bob</dc:creator>
		<pubDate>Mon, 17 Nov 2008 00:25:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.dagondesign.com/articles/automatic-mysql-backup-script/#comment-462577</guid>
		<description>Using this script is it possible to turn off the compression and just get the .sql file dump instead?</description>
		<content:encoded><![CDATA[<p>Using this script is it possible to turn off the compression and just get the .sql file dump instead?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mpampis</title>
		<link>http://www.dagondesign.com/articles/automatic-mysql-backup-script/#comment-462438</link>
		<dc:creator>Mpampis</dc:creator>
		<pubDate>Fri, 14 Nov 2008 10:25:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.dagondesign.com/articles/automatic-mysql-backup-script/#comment-462438</guid>
		<description>thanks its real good script</description>
		<content:encoded><![CDATA[<p>thanks its real good script</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DJ</title>
		<link>http://www.dagondesign.com/articles/automatic-mysql-backup-script/#comment-462080</link>
		<dc:creator>DJ</dc:creator>
		<pubDate>Thu, 06 Nov 2008 18:01:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.dagondesign.com/articles/automatic-mysql-backup-script/#comment-462080</guid>
		<description>You sir, are a lifesaver, I was halfway in, writing my own script before I found yours.  Thanks for saving me a weeks worth of work!</description>
		<content:encoded><![CDATA[<p>You sir, are a lifesaver, I was halfway in, writing my own script before I found yours.  Thanks for saving me a weeks worth of work!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: antialiasis</title>
		<link>http://www.dagondesign.com/articles/automatic-mysql-backup-script/#comment-461222</link>
		<dc:creator>antialiasis</dc:creator>
		<pubDate>Fri, 24 Oct 2008 01:36:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.dagondesign.com/articles/automatic-mysql-backup-script/#comment-461222</guid>
		<description>Does this script work on IIS (with PHP and MySQL installed, obviously, but still IIS)?</description>
		<content:encoded><![CDATA[<p>Does this script work on IIS (with PHP and MySQL installed, obviously, but still IIS)?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tiger</title>
		<link>http://www.dagondesign.com/articles/automatic-mysql-backup-script/#comment-457882</link>
		<dc:creator>Tiger</dc:creator>
		<pubDate>Wed, 24 Sep 2008 11:08:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.dagondesign.com/articles/automatic-mysql-backup-script/#comment-457882</guid>
		<description>Only one thing to say, thanks a lot for all your scripts and WP plugins, you only made great, clean and usefull scripts ;)
Thanks again for all your free work !</description>
		<content:encoded><![CDATA[<p>Only one thing to say, thanks a lot for all your scripts and WP plugins, you only made great, clean and usefull scripts <img src='http://www.dagondesign.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
Thanks again for all your free work !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jack</title>
		<link>http://www.dagondesign.com/articles/automatic-mysql-backup-script/#comment-456620</link>
		<dc:creator>Jack</dc:creator>
		<pubDate>Sat, 13 Sep 2008 22:40:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.dagondesign.com/articles/automatic-mysql-backup-script/#comment-456620</guid>
		<description>Man, I love you. I'm not gay but I really love you !</description>
		<content:encoded><![CDATA[<p>Man, I love you. I&#8217;m not gay but I really love you !</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: arjen</title>
		<link>http://www.dagondesign.com/articles/automatic-mysql-backup-script/#comment-456236</link>
		<dc:creator>arjen</dc:creator>
		<pubDate>Tue, 09 Sep 2008 13:12:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.dagondesign.com/articles/automatic-mysql-backup-script/#comment-456236</guid>
		<description>Hi all,

I am installing this script on a W2k3 box.
Everything seems fine exept the infamous "ZIP is not recognized as an internal or external command..." error.
I have included ZIP in the PATH: (C:\Program Files\WinZip\WINZIP32.EXE)

The config is like this:

// Path to the mysql commands (mysqldump, mysqladmin, etc..)
$MYSQL_PATH = 'C:\MySQL\bin';

// Mysql connection settings (must have root access to get all DBs)
$MYSQL_HOST = 'localhost';
$MYSQL_USER = 'root';
$MYSQL_PASSWD = '';

// Backup destination (will be created if not already existing)
$BACKUP_DEST = 'E:\80\backupdbs\db_backups';

// Temporary location (will be created if not already existing)
$BACKUP_TEMP = 'E:\80\backupdbs\tmp\backup_temp';

// Show script status on screen while processing
// (Does not effect log file creation)
$VERBOSE = true;

// Name of the created backup file (you can use PHP's date function)
// Omit file suffixes like .tar or .zip (will be set automatically)
$BACKUP_NAME = 'mysql_backup_SCE' . date('Y-m-d');

// Name of the standard log file
$LOG_FILE = $BACKUP_NAME . '.log';

// Name of the error log file
$ERR_FILE = $BACKUP_NAME . '.err';

// Which compression program to use
// Only relevant on unix based systems. Windows system will use zip command.
$COMPRESSOR = 'bzip2';

Does anyone have any idea what to correct?

Thanks in advance</description>
		<content:encoded><![CDATA[<p>Hi all,</p>
<p>I am installing this script on a W2k3 box.<br />
Everything seems fine exept the infamous &#8220;ZIP is not recognized as an internal or external command&#8230;&#8221; error.<br />
I have included ZIP in the PATH: (C:\Program Files\WinZip\WINZIP32.EXE)</p>
<p>The config is like this:</p>
<p>// Path to the mysql commands (mysqldump, mysqladmin, etc..)<br />
$MYSQL_PATH = &#8216;C:\MySQL\bin&#8217;;</p>
<p>// Mysql connection settings (must have root access to get all DBs)<br />
$MYSQL_HOST = &#8216;localhost&#8217;;<br />
$MYSQL_USER = &#8216;root&#8217;;<br />
$MYSQL_PASSWD = &#8221;;</p>
<p>// Backup destination (will be created if not already existing)<br />
$BACKUP_DEST = &#8216;E:\80\backupdbs\db_backups&#8217;;</p>
<p>// Temporary location (will be created if not already existing)<br />
$BACKUP_TEMP = &#8216;E:\80\backupdbs\tmp\backup_temp&#8217;;</p>
<p>// Show script status on screen while processing<br />
// (Does not effect log file creation)<br />
$VERBOSE = true;</p>
<p>// Name of the created backup file (you can use PHP&#8217;s date function)<br />
// Omit file suffixes like .tar or .zip (will be set automatically)<br />
$BACKUP_NAME = &#8216;mysql_backup_SCE&#8217; . date(&#8217;Y-m-d&#8217;);</p>
<p>// Name of the standard log file<br />
$LOG_FILE = $BACKUP_NAME . &#8216;.log&#8217;;</p>
<p>// Name of the error log file<br />
$ERR_FILE = $BACKUP_NAME . &#8216;.err&#8217;;</p>
<p>// Which compression program to use<br />
// Only relevant on unix based systems. Windows system will use zip command.<br />
$COMPRESSOR = &#8216;bzip2&#8242;;</p>
<p>Does anyone have any idea what to correct?</p>
<p>Thanks in advance</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: steve</title>
		<link>http://www.dagondesign.com/articles/automatic-mysql-backup-script/#comment-455803</link>
		<dc:creator>steve</dc:creator>
		<pubDate>Thu, 04 Sep 2008 15:05:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.dagondesign.com/articles/automatic-mysql-backup-script/#comment-455803</guid>
		<description>If you run manually from your browser you may find that you don't have permission to write the directories in root /db_backups etc.

If this is the case simply create db_backups amd tmp/backups_temp in the directory that the script is sitting.  Be sure to chmod 777 them too.</description>
		<content:encoded><![CDATA[<p>If you run manually from your browser you may find that you don&#8217;t have permission to write the directories in root /db_backups etc.</p>
<p>If this is the case simply create db_backups amd tmp/backups_temp in the directory that the script is sitting.  Be sure to chmod 777 them too.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Maski</title>
		<link>http://www.dagondesign.com/articles/automatic-mysql-backup-script/#comment-443976</link>
		<dc:creator>Maski</dc:creator>
		<pubDate>Mon, 18 Aug 2008 17:08:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.dagondesign.com/articles/automatic-mysql-backup-script/#comment-443976</guid>
		<description>I have excluded from de databases a couple that i dont need, but i get the backup from those and from information_schem..</description>
		<content:encoded><![CDATA[<p>I have excluded from de databases a couple that i dont need, but i get the backup from those and from information_schem..</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick</title>
		<link>http://www.dagondesign.com/articles/automatic-mysql-backup-script/#comment-437229</link>
		<dc:creator>Patrick</dc:creator>
		<pubDate>Tue, 12 Aug 2008 19:23:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.dagondesign.com/articles/automatic-mysql-backup-script/#comment-437229</guid>
		<description>Hi,

I believe that I have the script set up correctly but I am having no success with it.  Nice was not installed on the server so I have installed that.  However, when the script is executed it is generating the following errors (one for each database):

&#62; Processing Databases..
&#62; sh: /mysqldump: No such file or directory
&#62; DUMP FAILED
&#62;
&#62; DUMP FAILED
&#62;
&#62; sh: /nice: No such file or directory
&#62; COMPRESSION FAILED
&#62;
&#62; COMPRESSION FAILED

(Repeated 10 more times - presumably one for each database)

and finishing up with:

Archiving files..
sh: /cd: No such file or directory
FAILED

FAILED


*** ERRORS DETECTED! ***
Check your email account ************** for more information!


Emailing backup to ******************* ..
PHP Warning:  file_get_contents(): Unable to access /root/db_backups/mysql_backup_2008-08
-12.tar in /root/scripts/backup_dbs.php on line 303
PHP Warning:  file_get_contents(/root/db_backups/mysql_backup_2008-08-12.tar): failed to
open stream: No such file or directory in /root/scripts/backup_dbs.php on line 303

There were errors!
Emailing error log to *************** ..
qmail-inject: fatal: unable to parse this line:
From: ************&#62;MIME-Version: 1.0
FAILED to email error log.
FAILED to email error log.

(Despite the last few lines I am receiving an e-mail with the errors and an attached .tar file of 0 bytes).

I am running under Plesk which seems to be problematical for some.

Any help would be appreciated.</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I believe that I have the script set up correctly but I am having no success with it.  Nice was not installed on the server so I have installed that.  However, when the script is executed it is generating the following errors (one for each database):</p>
<p>&gt; Processing Databases..<br />
&gt; sh: /mysqldump: No such file or directory<br />
&gt; DUMP FAILED<br />
&gt;<br />
&gt; DUMP FAILED<br />
&gt;<br />
&gt; sh: /nice: No such file or directory<br />
&gt; COMPRESSION FAILED<br />
&gt;<br />
&gt; COMPRESSION FAILED</p>
<p>(Repeated 10 more times - presumably one for each database)</p>
<p>and finishing up with:</p>
<p>Archiving files..<br />
sh: /cd: No such file or directory<br />
FAILED</p>
<p>FAILED</p>
<p>*** ERRORS DETECTED! ***<br />
Check your email account ************** for more information!</p>
<p>Emailing backup to ******************* ..<br />
PHP Warning:  file_get_contents(): Unable to access /root/db_backups/mysql_backup_2008-08<br />
-12.tar in /root/scripts/backup_dbs.php on line 303<br />
PHP Warning:  file_get_contents(/root/db_backups/mysql_backup_2008-08-12.tar): failed to<br />
open stream: No such file or directory in /root/scripts/backup_dbs.php on line 303</p>
<p>There were errors!<br />
Emailing error log to *************** ..<br />
qmail-inject: fatal: unable to parse this line:<br />
From: ************&gt;MIME-Version: 1.0<br />
FAILED to email error log.<br />
FAILED to email error log.</p>
<p>(Despite the last few lines I am receiving an e-mail with the errors and an attached .tar file of 0 bytes).</p>
<p>I am running under Plesk which seems to be problematical for some.</p>
<p>Any help would be appreciated.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
