LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-07-2004, 04:23 AM   #1
DropHit
Member
 
Registered: Oct 2003
Posts: 95

Rep: Reputation: 15
backing up MySQL dbase


OK i have tried a few different ways to back up all of mysql databses

First was a script run from cron it owrked fine for a while then i ran into a table corruption problem. Basically i gather that somone was making an update via one of our websites, and the dump was happening at the same time.

So itried the webmin backup and the same thing has happened.

So the big question is how to doit?

Z
 
Old 02-07-2004, 05:10 AM   #2
ugge
Senior Member
 
Registered: Dec 2000
Location: Gothenburg, SWEDEN
Distribution: OpenSUSE 10.3
Posts: 1,028

Rep: Reputation: 45
It seems as though mysqldump has an option to lock your tables for read on all tables. Might be what your looking for.
 
Old 02-07-2004, 05:51 AM   #3
DropHit
Member
 
Registered: Oct 2003
Posts: 95

Original Poster
Rep: Reputation: 15
Hum yeah maybe...

Yeah that seems right, alhtough i am trying the mysqlhotcopy now seems ALOT faster anyway although i am unsure how to recover using the files that mysqlhotcopy creates, any insight onthis?

Z
 
Old 02-07-2004, 06:18 AM   #4
ugge
Senior Member
 
Registered: Dec 2000
Location: Gothenburg, SWEDEN
Distribution: OpenSUSE 10.3
Posts: 1,028

Rep: Reputation: 45
No, sorry!
The once I have seen have dumped it to sql files. Then you could just run them as a SQL batch job.
 
Old 02-07-2004, 04:11 PM   #5
DropHit
Member
 
Registered: Oct 2003
Posts: 95

Original Poster
Rep: Reputation: 15
Hum ok

Well ok i guess it should be easy since it made backups of everything, yeah i could also go back to using the mysqldump with the lock command, although it is REALLY slow since my dbase os around 100 mg the hotcopy takes about 9 secs and is done!!

Z
 
Old 05-04-2004, 03:19 PM   #6
Nnyan
LQ Newbie
 
Registered: Jun 2003
Posts: 6

Rep: Reputation: 0
Use the -opt command which is the same as specifying
--add-drop-table --add-locks --create-options --disable-keys --extended-insert --lock-tables --quick --set-charset

The -quick command really speeds up mysqldump.


Heres a snippet of the shell script i'm using:

/usr/local/mysql/bin/mysqldump --flush-logs --opt -u SQLUSER -pSQLPWD dbname > /dir1/dir2/dir3/backup.sql
 
  


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
Backing up MySQL without the dumping jme Linux - Software 8 05-27-2006 12:01 AM
Backing up mysql without it actually being on c00l Linux - General 1 03-12-2005 01:03 PM
Backing up MySql bifur Linux - Software 8 01-05-2005 07:30 PM
Dosemu and Dbase JoelFlores Linux - Software 1 09-01-2004 08:33 PM
Backing up large MySQL DB's WeNdeL Linux - Software 5 11-29-2003 09:34 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:50 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