PDA

View Full Version : Mysqldump is killing me


RobbieB
2007-03-06, 15:35 PM
I'm running a windows scheduled bat to backup a mysql db and everytime it kicks it pretty much shuts down my website during the 12 minutes it's dumping. I was wondering if anyone had a better backup method... or maybe its time for a server upgrade (Athlon 3000 [2.10ghz] 1gb ram
Here's my code

REM @echo off

for /f "tokens=1" %%i in ('date /t') do set DATE_DOW=%%i

for /f "tokens=2" %%i in ('date /t') do set DATE_DAY=%%i
for /f %%i in ('echo %date_day:/=-%') do set DATE_DAY=%%i
for /f %%i in ('time /t') do set DATE_TIME=%%i
for /f %%i in ('echo %date_time::=-%') do set DATE_TIME=%%i

"C:\Program Files\MySQL\MySQL Server 4.1\bin\mysqldump" -u username-p"secret" database >"D:\database backups\"%DATE_DAY%_%DATE_TIME%_database.sql

FYI, the dump is almost 630MB

RobbieB
2007-03-06, 18:26 PM
Well, I was able to trim some fat from the db so everything is okay now. Sorry to bother :blah:

Tino Didriksen
2007-03-07, 01:59 AM
Tried running the dump process with lower priority?
In Windows that can be done with: start /BELOWNORMAL command-goes-here

Btw, 630mb uncompressed is nothing...my MySQL dumps are 2.5gb gzipped, and I have not had any problems. Sure the site slows down a bit during the dump, but still usable.

RobbieB
2007-03-07, 12:49 PM
I'll try that, but my site would just not work period while dumping. if it was just slow I wouldn't complain.