List:General Discussion« Previous MessageNext Message »
From:Will Glass-Husain Date:September 9 2003 1:47pm
Subject:Re: Backing up all MySQL DBs
View as plain text  

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


WILL
wglass@stripped

----- Original Message ----- 
> From: "Mike Hillyer" <mhlists@stripped>
> To: "René Mølsted" <molsted@stripped>;
> <mysql@stripped>
> Sent: Monday, September 08, 2003 9:02 PM
> Subject: RE: Backing up all MySQL DBs
>
>
> > Sure, use the --all-databases option instead of $DBNAME
> > http://www.mysql.com/doc/en/mysqldump.html
> >
> > Regards,
> > Mike Hillyer
> > www.vbmysql.com
> >
> >
> > > -----Original Message-----
> > > From: René Mølsted [mailto:molsted@stripped]
> > > Sent: Monday, September 08, 2003 11:51 AM
> > > To: mysql@stripped
> > > Subject: Backing up all MySQL DBs
> > >
> > >
> > > Hi everybody
> > > I'm pretty new to MySQL (and to this list). My problem is I need to
get
> > > a dump of all databases in seperate files, I know how to do one
> > > database to one file and all databases to one file.
> > > So far I'm using this command:
> > > mysqldump --user "$USERNAME" --password="$PASSWORD" "$DBNAME" | gzip>
> > > "$DBNAME"db_"$DATE".sql.gz
> > >
> > > Is there a way selecting all databases?
> > >
> > > René Mølsted
> > >
> > > --
> > > MySQL General Mailing List
> > > For list archives: http://lists.mysql.com/mysql
> > > To unsubscribe:
http://lists.mysql.com/mysql?unsub=1
> > >
> > >
> >
> >
> >
> > -- 
> > MySQL General Mailing List
> > For list archives: http://lists.mysql.com/mysql
> > To unsubscribe:    http://lists.mysql.com/mysql?unsub=1
> >
>

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