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 10:00 AM, Matthew Gillen <[hidden email]> wrote: 
> Matt Shields wrote: 
> > On Jan 3, 2008 9:43 AM, Matthew Gillen <[hidden email]> wrote: 
> >>> Can't you just use rsync on the MySQL data directories to create a mirror? 
> >> 
> >> Only if you shut down the server first, to guarantee that you're not in the 
> >> middle of operation that would leave the on-disk database in an inconsistent 
> >> state (and thus unusable as a backup). 
> > 
> > Yes you can.  Do a flush tables, then do a LVM snapshot.  You can then 
> > copy the files.  Once the file copy is done, release the snapshot.  I 
> > use this method to refresh my replicated slaves if something gets 
> > corrupted on them.  Master db stays online the whole time. 
> 
> And this works since the LVM snapshot operation is instantaneous? Interesting 
> technique. 
> 
> It seems like theoretically you could still get in trouble, but unless your 
> server is extremely busy with update operations, it seems highly unlikely that 
> the split second between the flush and snapshot operations would see an 
> attempt by MySQL to update the on-disk representation. 
> 
> Am I wrong? 
> 
> Matt 
> 


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 / webmaster@blu.org