[horde] Backing up horde databases

-ray ray at ops.selu.edu
Fri Dec 15 08:59:10 PST 2006

Why not use the mysqlhotcopy command?  It allows mysql hot backups.  I use 
this perl script, and while it's pretty hackish, it's been working fine 
for me, but YMMV.


$ENV{'HOME'} = '/root';

@DBS=`mysqlshow  | awk '{print \$2}' | grep -v '^Databases'  | grep -v '^\$' `;

system("/bin/rm -rf /opt/mysql-backup/*");

foreach $db (@DBS) {
    if ($db) {
         print "Backing up $db\n";
         system("/usr/bin/mysqlhotcopy  $db $backupdir");

On Fri, 15 Dec 2006, Aaron Segura wrote:

> When I said "Running" database, I meant one where mysqld is running.
> I'm not sure of the results if nobody is accessing it at the time,
> though, as I'm not that much of a MySQL guru.  Try it and let me know
> how it works out for you :)
> -----Original Message-----
> From: horde-bounces at lists.horde.org
> [mailto:horde-bounces at lists.horde.org] On Behalf Of Eric
> Sent: Friday, December 15, 2006 7:59 AM
> To: horde at lists.horde.org
> Subject: Re: [horde] Backing up horde databases
> At 04:05 PM 12/14/2006, Aaron Segura wrote:
> <AS>>>>>I should say, "Tarring up the raw files from a *running*
> database will only cause you to cry when/if you try to restore"<<<<<
> Good morning, Aaron.
> I have called up the link you provided and also am looking over the
> mysqldump man page.  Doesn't seem too hard.  :-)
> Just to clarify one thing, though ... Does a "running" database imply
> that someone is accessing the database, or is a database "running"
> whenever mysqld is running, whether or not anyone is accessing it?
> In other words, if I used the tarball method, and had a means for
> preventing access, would I still need to shut down mysqld first?
> This is all somewhat hypothetical now that you've shown me the
> "right" way :-) but I was just curious what constitutes a "running"
> database.
> Thanks...

Ray DeJean  				       	 http://www.r-a-y.org
Systems Engineer                    Southeastern Louisiana University
IBM Certified Specialist  	      AIX Administration, AIX Support

More information about the horde mailing list