[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] Backing Up



On Wed, 16 Jul 2003 19:52:05 +0000, Andy Jacobs wrote:

> A little OT, but I thought I would share this with you all. I run a
> dedicated Raq with Host Europe.  The 60 odd sites on that box are all backed
> up but not the user data or the MySQL tables etc that are used on a couple
> of sites.

For making a backup of a database I believe the database should be shutdown temporarily. You could script that, but what also works is a script that exports all current tables. (just anytime you want to)

like this:

for var in `find /var/lib/mysql/ -type d | \
sed -e "s/\/var\/lib\/mysql\///"` 
do
    echo "Backup: $var" 
    mysqldump --user=reader --password=password $var > $var.dump
done

The user "reader" has read-rights to ALL databases (setup once and forget about it, even when you make new databases)

Then we backup all files on the server using Tivoli backup software (incrementals only) to our central backup-server. BTW, the XFS-filesystem on the 550 is not supported by tivoli, so I have to use an nfs-mount of the filesystems (/, /var and /home) to get them to backup....
 
> The hard drive crashed today and I'm sitting here faced with a very long
> night trying to get everything back the way it was.
> 
> There will be many self righteous individuals out there sitting there
> feeling very smug with themselves.  Good for them.
> 
> There will be many not so self righteous out there saying that it won't
> happen to them.  Just like I did every time someone posted into the Cobalt
> Users group telling people about their hard drive crashes...

Good luck restoring.