LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-01-2010, 01:21 PM   #1
nima0102
Member
 
Registered: Nov 2006
Posts: 209

Rep: Reputation: 30
Mysql Backup


Hi
I read some documents on HowtoForge site about mysql backup. recently I read 2 documents, 1 and 2 . In these documents was mentioned to consistent backup,one solution is "read lock and flush cache" and another is "replicated mysql ". Does not "mysqldump" built-in use "read lock and flush cache" and I have to apply manually ??
That means, I can use mysqldump only mysql is stop, is it true?

Thanks in advance
 
Old 02-01-2010, 08:59 PM   #2
choogendyk
Senior Member
 
Registered: Aug 2007
Location: Massachusetts, USA
Distribution: Solaris 9 & 10, Mac OS X, Ubuntu Server
Posts: 1,197

Rep: Reputation: 105Reputation: 105
Check the documentation on mysql.com -- http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html. Table locking is an option when you call mysqldump. There is a lot of control there.

If you are trying to set up a rigorous and automated backup scheme, you might also take a look at ZRM for MySQL -- http://www.mysql.com/products/backup/zrm.html. You can get it open source, or you can get it with full service and support contracts.
 
Old 02-01-2010, 09:18 PM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
I heard a programmer for Drizzle in a podcast. He said many enterprises use migrate LVM snapshots instead, so they are able to use the same procedure to backup the database as they do for everything else.
 
Old 02-02-2010, 06:44 AM   #4
choogendyk
Senior Member
 
Registered: Aug 2007
Location: Massachusetts, USA
Distribution: Solaris 9 & 10, Mac OS X, Ubuntu Server
Posts: 1,197

Rep: Reputation: 105Reputation: 105
Snapshots are a good thing and improve your odds, but they do not guarantee consistency, especially with databases. You're basically operating with your fingers crossed. I've been using fssnap with ufsdump on Solaris for years. Even with fssnap, Sun's official line is that you should take a system down to single user to do backups. I've actually been bitten by this once or twice over the years.

A main advantage of snapshots is that you can reduce the time window that something has to be shut down or locked (quiesce is the official term). You can shut down an application, or lock and flush tables, do the snapshot, bring them back online, and then backup the snapshot. So, instead of being shutdown for the entire backup, you are shutdown only for the few seconds it takes to do the snapshot.

You should still use proper procedures for databases.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
best way to backup mysql db jindalarpan Linux - Server 3 07-31-2009 03:50 AM
how to create backup MYSQL Script to backup my database for every 1hour RMLinux Linux - Newbie 3 11-20-2008 10:13 AM
LXer: MySQL Backup And Recovery With mysql-zrm On Debian Sarge LXer Syndicated Linux News 0 09-28-2006 08:21 AM
Mysql backup? marghorp Linux - Software 11 02-24-2004 01:18 PM
mysql backup ram_dhupkar Linux - General 13 09-09-2003 07:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration