Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive

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

Re: mysql backup quesiton

 On Jan 3, 2008 9:17 AM, Stephen Adler <[hidden email]> wrote: 
> I need to backup my mysql database. Doing the 5min google search on the 
> topic, it looks like mysqldump is the tool of choice. The bit which I 
> don't like about mysqldump, is that it generates an ascii .sql script 
> which if invoked on a fresh mysql database, will recreate the database. 

This is not entirely accurate.  Assuming you are using a recent 
version of MySQL, it will not recreate the database, but it will drop 
and recreate all of the tables in the database.  The --opt option to 
mysqldump is the default since MySQL 4.1 (IIRC).  This option will add 
drop table statements (--add-drop-table) to the dump.  If you want to 
avoid this, run the command with --skip-opt and -t.  This will 
generate only insert statements.  Can I ask why you are worried about 
recreating the tables? 

> Are there any database 
> synchronization tools or database mirroring tools which will do an 
> rsync like operation between databases? 
> The same for a database would be great, and thus ever 24 hours, I 
> would only have to update the new content in the database, instead of 
> dump out everything into an ascii file... 

It sounds like what you really want is to replicate the database. 
Will any apps actually be using this second instance of the db? 
Perhaps describe in more detail what you want to do. 

This message has been scanned for viruses and 
dangerous content by MailScanner, and is 
believed to be clean. 

Discuss mailing list 
[hidden email]

BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!

Boston Linux & Unix /