<?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"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: More on MySQL backups</title>
	<atom:link href="http://www.darcynorman.net/2006/03/15/more-on-mysql-backups/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.darcynorman.net/2006/03/15/more-on-mysql-backups/</link>
	<description>just a lowly edtech geek, mumble mumble university of calgary</description>
	<lastBuildDate>Sun, 21 Mar 2010 17:18:11 -0600</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Cornelius Jaeger</title>
		<link>http://www.darcynorman.net/2006/03/15/more-on-mysql-backups/#comment-81578</link>
		<dc:creator>Cornelius Jaeger</dc:creator>
		<pubDate>Wed, 31 Dec 1969 17:00:00 +0000</pubDate>
		<guid isPermaLink="false">2049584337#comment-81578</guid>
		<description>and what i wanted to ask is, can you do this with mysql?</description>
		<content:encoded><![CDATA[<p>and what i wanted to ask is, can you do this with mysql?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: D'Arcy</title>
		<link>http://www.darcynorman.net/2006/03/15/more-on-mysql-backups/#comment-81579</link>
		<dc:creator>D'Arcy</dc:creator>
		<pubDate>Wed, 31 Dec 1969 17:00:00 +0000</pubDate>
		<guid isPermaLink="false">2049584337#comment-81579</guid>
		<description>Cornelius - not sure if MySQL can verify the dumps. I&#039;ve stopped playing with FB for a couple of years now - can&#039;t justify the cost to get access to the full set of DB tools - so can&#039;t compare.

A quick Google didn&#039;t turn up anything or verifying MySQL database dumps, but that doesn&#039;t mean it&#039;s not possible...</description>
		<content:encoded><![CDATA[<p>Cornelius &#8211; not sure if MySQL can verify the dumps. I&#8217;ve stopped playing with FB for a couple of years now &#8211; can&#8217;t justify the cost to get access to the full set of DB tools &#8211; so can&#8217;t compare.</p>
<p>A quick Google didn&#8217;t turn up anything or verifying MySQL database dumps, but that doesn&#8217;t mean it&#8217;s not possible&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cornelius Jaeger</title>
		<link>http://www.darcynorman.net/2006/03/15/more-on-mysql-backups/#comment-81580</link>
		<dc:creator>Cornelius Jaeger</dc:creator>
		<pubDate>Wed, 31 Dec 1969 17:00:00 +0000</pubDate>
		<guid isPermaLink="false">2049584337#comment-81580</guid>
		<description>Hi Guys,

Nice scripts.
I mostly use FrontBase, and it allows you to check it&#039;s catalog file for the validity / integrity of the dump. so i basically make a backup of the db to a file in a directory nonverifiedbackups. then run a FBListContents on the file. if it is invalid an email is sent to the admin. if it isn&#039;t it is moved to a directory verified backups.
i&#039;m not sure how to make the code frame above, i&#039;ll send the script on request.</description>
		<content:encoded><![CDATA[<p>Hi Guys,</p>
<p>Nice scripts.<br />
I mostly use FrontBase, and it allows you to check it&#8217;s catalog file for the validity / integrity of the dump. so i basically make a backup of the db to a file in a directory nonverifiedbackups. then run a FBListContents on the file. if it is invalid an email is sent to the admin. if it isn&#8217;t it is moved to a directory verified backups.<br />
i&#8217;m not sure how to make the code frame above, i&#8217;ll send the script on request.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: D&#8217;Arcy Norman Dot Net &#187; Blog Archive &#187; Blo</title>
		<link>http://www.darcynorman.net/2006/03/15/more-on-mysql-backups/#comment-81581</link>
		<dc:creator>D&#8217;Arcy Norman Dot Net &#187; Blog Archive &#187; Blo</dc:creator>
		<pubDate>Wed, 31 Dec 1969 17:00:00 +0000</pubDate>
		<guid isPermaLink="false">2049584337#comment-81581</guid>
		<description>[...] Update: One of the things I&#8217;m loving about hosting at Dreamhost is that backups are trivial. I have a script in my hosted account that I can trigger via SSH, and it will rsync my entire home directory (including all files needed to host my domain and any subdomains) to my desktop box on campus for backup. And, because rsync is so cool, it only takes a few seconds, since only changed files are sent. So, I can make sure all of my 300+MB of files are backed up in about 10 seconds. Add a scripted mysqldump into the mix, and all data backups are up to date as well. [...]</description>
		<content:encoded><![CDATA[<p>[...] Update: One of the things I&#8217;m loving about hosting at Dreamhost is that backups are trivial. I have a script in my hosted account that I can trigger via SSH, and it will rsync my entire home directory (including all files needed to host my domain and any subdomains) to my desktop box on campus for backup. And, because rsync is so cool, it only takes a few seconds, since only changed files are sent. So, I can make sure all of my 300+MB of files are backed up in about 10 seconds. Add a scripted mysqldump into the mix, and all data backups are up to date as well. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon</title>
		<link>http://www.darcynorman.net/2006/03/15/more-on-mysql-backups/#comment-81582</link>
		<dc:creator>Jon</dc:creator>
		<pubDate>Wed, 31 Dec 1969 17:00:00 +0000</pubDate>
		<guid isPermaLink="false">2049584337#comment-81582</guid>
		<description>D&#039;Arcy,

Here is what I run on my servers:
&lt;code&gt;
#!/bin/sh
# mysqlback.sh -- do mysql database dumps -- t&#124;&lt;evans
# Sun Jun 22 11:00:35 EDT 2003
########################
PATH=/usr/local/bin:$PATH
BACKDIR=/usr/local/mysql/backups
DAYSBACK=7
export PATH BACKDIR DAYSBACK
########################
# clean up backups older
# than $DAYSBACK
########################
cd $BACKDIR
find . -mtime +$DAYSBACK -exec rm -f {} \;
#########################
# get a list of databases
#########################
cat &lt;&lt;EOF &gt; tmpsql$$
show databases;
EOF
/usr/local/mysql/bin/mysql -u root --password=******* &lt; tmpsql$$ &#124; sed &#039;/Database/d&#039; &gt; dblist$$
#########################
# back each one up in turn;
# --opt locks tables during
# backup, so no need to shut
# down mysql; but access will
# be denied during backup
#
# we also pipe through gzip
#########################
for DB in `cat dblist$$`
do /usr/local/mysql/bin/mysqldump -u root --password=******** --opt --flush-logs $DB &#124; gzip &gt; $DB.`date &#039;+%m.%d.%y&#039;`.gz
done
###################
# empty the logfile
###################
rm /usr/local/mysql/logs/mysql.log.*
cat /dev/null &gt; /usr/local/mysql/logs/mysql.log

#######
# email
#######
ls -l $BACKDIR &#124; /usr/bin/mail -s &quot;MySQL Backup Completed&quot; user@domain
##########
# clean up
##########
rm dblist$$ tmpsql$$
&lt;/code&gt;

Not sure how it compares.</description>
		<content:encoded><![CDATA[<p>D&#8217;Arcy,</p>
<p>Here is what I run on my servers:<br />
<code><br />
#!/bin/sh<br />
# mysqlback.sh -- do mysql database dumps -- t|<evans # Sun Jun 22 11:00:35 EDT 2003<br />
########################<br />
PATH=/usr/local/bin:$PATH<br />
BACKDIR=/usr/local/mysql/backups<br />
DAYSBACK=7<br />
export PATH BACKDIR DAYSBACK<br />
########################<br />
# clean up backups older<br />
# than $DAYSBACK<br />
########################<br />
cd $BACKDIR<br />
find . -mtime +$DAYSBACK -exec rm -f {} \;<br />
#########################<br />
# get a list of databases<br />
#########################<br />
cat <<EOF > tmpsql$$<br />
show databases;<br />
EOF<br />
/usr/local/mysql/bin/mysql -u root --password=******* < tmpsql$$ | sed '/Database/d' > dblist$$<br />
#########################<br />
# back each one up in turn;<br />
# --opt locks tables during<br />
# backup, so no need to shut<br />
# down mysql; but access will<br />
# be denied during backup<br />
#<br />
# we also pipe through gzip<br />
#########################<br />
for DB in `cat dblist$$`<br />
do /usr/local/mysql/bin/mysqldump -u root --password=******** --opt --flush-logs $DB | gzip > $DB.`date '+%m.%d.%y'`.gz<br />
done<br />
###################<br />
# empty the logfile<br />
###################<br />
rm /usr/local/mysql/logs/mysql.log.*<br />
cat /dev/null > /usr/local/mysql/logs/mysql.log</p>
<p>#######<br />
# email<br />
#######<br />
ls -l $BACKDIR | /usr/bin/mail -s "MySQL Backup Completed" user@domain<br />
##########<br />
# clean up<br />
##########<br />
rm dblist$$ tmpsql$$<br />
</evans></code></p>
<p>Not sure how it compares.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: D'Arcy</title>
		<link>http://www.darcynorman.net/2006/03/15/more-on-mysql-backups/#comment-81583</link>
		<dc:creator>D'Arcy</dc:creator>
		<pubDate>Wed, 31 Dec 1969 17:00:00 +0000</pubDate>
		<guid isPermaLink="false">2049584337#comment-81583</guid>
		<description>Oh, sure. NOW I see your script :-)  I&#039;ll totally be ripping this sucker off first thing in the morning. Thanks! The part where you talk with mysql to get the db list would have stumped me for longer than I&#039;d care to admit...

(comment edited to fix silly qwerty typos. must change all layouts to dvorak...)</description>
		<content:encoded><![CDATA[<p>Oh, sure. NOW I see your script <img src='http://www.darcynorman.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />   I&#8217;ll totally be ripping this sucker off first thing in the morning. Thanks! The part where you talk with mysql to get the db list would have stumped me for longer than I&#8217;d care to admit&#8230;</p>
<p>(comment edited to fix silly qwerty typos. must change all layouts to dvorak&#8230;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon</title>
		<link>http://www.darcynorman.net/2006/03/15/more-on-mysql-backups/#comment-81584</link>
		<dc:creator>Jon</dc:creator>
		<pubDate>Wed, 31 Dec 1969 17:00:00 +0000</pubDate>
		<guid isPermaLink="false">2049584337#comment-81584</guid>
		<description>Glad I could help. I found it in a google search and modified it a bit. Mr. Evans should get the credit.

On my Xserve I run this script along with a script to tar the WebServer directory. The script then tars the MySQL backup directory and sftps both tar files to a server which is backed up to a SAN. I think you discovered the sftp using key pairs in an earlier post. I&#039;d known about that for a while. It was on O&#039;Reilly a few years ago (well the key pair thing for SSHwas) and that is how I have secured SSH on my servers. I actually require a password to use the key when doing SSH so that no one could login even if they got my laptop (which is the only machine that can login to the server).

If there is anything else your trying to do let me know. I may have a few more tricks up my sleeve (mostly borrowed from scripts found by googling or on OS X Hints).</description>
		<content:encoded><![CDATA[<p>Glad I could help. I found it in a google search and modified it a bit. Mr. Evans should get the credit.</p>
<p>On my Xserve I run this script along with a script to tar the WebServer directory. The script then tars the MySQL backup directory and sftps both tar files to a server which is backed up to a SAN. I think you discovered the sftp using key pairs in an earlier post. I&#8217;d known about that for a while. It was on O&#8217;Reilly a few years ago (well the key pair thing for SSHwas) and that is how I have secured SSH on my servers. I actually require a password to use the key when doing SSH so that no one could login even if they got my laptop (which is the only machine that can login to the server).</p>
<p>If there is anything else your trying to do let me know. I may have a few more tricks up my sleeve (mostly borrowed from scripts found by googling or on OS X Hints).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: D'Arcy</title>
		<link>http://www.darcynorman.net/2006/03/15/more-on-mysql-backups/#comment-81585</link>
		<dc:creator>D'Arcy</dc:creator>
		<pubDate>Wed, 31 Dec 1969 17:00:00 +0000</pubDate>
		<guid isPermaLink="false">2049584337#comment-81585</guid>
		<description>Jon - serious thanks for that script. MUCH better than mine. I&#039;ve deployed trivially tweaked versions of it to both servers, and it appears to work perfectly. Love the 7-day backup snapshots as well.</description>
		<content:encoded><![CDATA[<p>Jon &#8211; serious thanks for that script. MUCH better than mine. I&#8217;ve deployed trivially tweaked versions of it to both servers, and it appears to work perfectly. Love the 7-day backup snapshots as well.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
