List:General Discussion« Previous MessageNext Message »
From:Jerry M. Howell II Date:September 10 2003 9:25am
Subject:Re: Backing up all MySQL DBs
View as plain text  
On Tue, Sep 09, 2003 at 06:47:52AM -0700, Will Glass-Husain wrote:
> 
> 
> There's also
> 
> # backup databases
> for dbname in `echo 'show databases;' |  mysql -u$dbuser -p$dbpassword`
> do
>                 echo "Backing up database $dbname..."  >>
> $destdir/backup.log
>                 mysqldump -u$dbuser -p$dbpassword $dbname | zip -q9
> $destdir/db_$dbname.zip - >> $destdir/backup.log
> done
> 
> 
This is the metod I use as it makes it easier to replace 1 database
ifone of my clients screw it up. It's happened at least a few times
already. I just add it into a script and copy it to the apropriate
directory only part I'd add it the date apended to the filename. Just
incase you need to restore a backup from a week ago instead of just
yesterday.
-- 
Jerry M. Howell II
Thread
Backing up all MySQL DBsRené Mølsted8 Sep
  • RE: Backing up all MySQL DBsMike Hillyer9 Sep
Re: Backing up all MySQL DBsWill Glass-Husain9 Sep
  • Re: Backing up all MySQL DBsJerry M. Howell II10 Sep