473,670 Members | 2,495 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

mysqldump blocks httpd server

Hello,

I'm trying to make a daily database backup. When executing "mysqldump -
uxxx -pxxx database /home/backup/ddbb.sql -q &" the httpd server
gets blocked and my site is "offline" for 30 minutes. I also tried
using mysqlhotcopy, but with no success since it fails with error:
"DBD::mysql ::db do failed: Not unique table/alias: 'comments' at /usr/
bin/mysqlhotcopy line 466."

I'd like to make a daily MySQL backup, but without freezing my httpd
server. Any ideas?

Thanks,

Antoni Massó Mola

Mar 24 '07 #1
6 6156
Antoni wrote:
Hello,

I'm trying to make a daily database backup. When executing "mysqldump -
uxxx -pxxx database /home/backup/ddbb.sql -q &" the httpd server
gets blocked and my site is "offline" for 30 minutes. I also tried
using mysqlhotcopy, but with no success since it fails with error:
"DBD::mysql ::db do failed: Not unique table/alias: 'comments' at /usr/
bin/mysqlhotcopy line 466."

I'd like to make a daily MySQL backup, but without freezing my httpd
server. Any ideas?

Thanks,

Antoni Massó Mola
Are you perhaps using --locak-all-tables in the parameter list of the
mysqldump command (http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html)?

To help us trouble shoot it would help if you would specify the command
line options you use and give us an estimate of the database and system
specs.

To prevent such problems I am not backing up my main server but use
replication to another server. To me it is no problem if the second
server to which the database is replicated is be offline for longer
periods, my main server should not, just like yours, more information
about replication can be gound in the MySQL manual:
http://dev.mysql.com/doc/refman/5.1/en/replication.html

Jonathan
Mar 24 '07 #2
Hello Jonathan,

Im using MySQL 5.0.21-log in a Linux 2.4.33grs-bipiv-ipv4-32 #1 i686
Intel(R) Core(TM)2 CPU T5500 @ 1.66GHz GNU/Linux.

I did not include the --lock-all-tables parameter when running the
mysqldump command. May this parameter be assigned in another MySQL
configuration file?

The cron job executed every day is "mysqldump -uxxx -pxxx database /
home/backup/ddbb.sql -q &".

I'll use replication as soon as we get the money to purchase a second
server, but for now we need to stick with one server. The only two
possible ways I found for creating a database backup are mysqldump and
mysqlhotcopy. Is there any other way I can use?

Thanks!

Antoni

Jonathan ha escrit:
Antoni wrote:
Hello,

I'm trying to make a daily database backup. When executing "mysqldump -
uxxx -pxxx database /home/backup/ddbb.sql -q &" the httpd server
gets blocked and my site is "offline" for 30 minutes. I also tried
using mysqlhotcopy, but with no success since it fails with error:
"DBD::mysql ::db do failed: Not unique table/alias: 'comments' at /usr/
bin/mysqlhotcopy line 466."

I'd like to make a daily MySQL backup, but without freezing my httpd
server. Any ideas?

Thanks,

Antoni Massó Mola

Are you perhaps using --locak-all-tables in the parameter list of the
mysqldump command (http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html)?

To help us trouble shoot it would help if you would specify the command
line options you use and give us an estimate of the database and system
specs.

To prevent such problems I am not backing up my main server but use
replication to another server. To me it is no problem if the second
server to which the database is replicated is be offline for longer
periods, my main server should not, just like yours, more information
about replication can be gound in the MySQL manual:
http://dev.mysql.com/doc/refman/5.1/en/replication.html

Jonathan
Mar 24 '07 #3
>Im using MySQL 5.0.21-log in a Linux 2.4.33grs-bipiv-ipv4-32 #1 i686
>Intel(R) Core(TM)2 CPU T5500 @ 1.66GHz GNU/Linux.

I did not include the --lock-all-tables parameter when running the
mysqldump command. May this parameter be assigned in another MySQL
configuratio n file?

The cron job executed every day is "mysqldump -uxxx -pxxx database /
home/backup/ddbb.sql -q &".

I'll use replication as soon as we get the money to purchase a second
server, but for now we need to stick with one server. The only two
possible ways I found for creating a database backup are mysqldump and
mysqlhotcopy . Is there any other way I can use?
Replication. You can run multiple independent instances of MySQL
on the same server (but you need the CPU, memory, and disk resources
to do it) using independent port numbers, data directory locations,
socket, separate mysqld daemons, possibly separate UIDs, etc. You
distinguish which server to talk to by the port number or socket
location.

If load is an issue, it is possible to stop replication during the busy
period, then restart it during a lull, wait for replication to catch
up (SHOW SLAVE STATUS), stop replication again, and then mysqldump.

Mar 24 '07 #4
Thanks for your reply Gordon. Do you know of any tutorial that
explains how to achieve this?

Thanks again,

Antoni

Gordon Burditt ha escrit:
Im using MySQL 5.0.21-log in a Linux 2.4.33grs-bipiv-ipv4-32 #1 i686
Intel(R) Core(TM)2 CPU T5500 @ 1.66GHz GNU/Linux.

I did not include the --lock-all-tables parameter when running the
mysqldump command. May this parameter be assigned in another MySQL
configuration file?

The cron job executed every day is "mysqldump -uxxx -pxxx database /
home/backup/ddbb.sql -q &".

I'll use replication as soon as we get the money to purchase a second
server, but for now we need to stick with one server. The only two
possible ways I found for creating a database backup are mysqldump and
mysqlhotcopy. Is there any other way I can use?

Replication. You can run multiple independent instances of MySQL
on the same server (but you need the CPU, memory, and disk resources
to do it) using independent port numbers, data directory locations,
socket, separate mysqld daemons, possibly separate UIDs, etc. You
distinguish which server to talk to by the port number or socket
location.

If load is an issue, it is possible to stop replication during the busy
period, then restart it during a lull, wait for replication to catch
up (SHOW SLAVE STATUS), stop replication again, and then mysqldump.
Mar 24 '07 #5
Antoni wrote:
Thanks for your reply Gordon. Do you know of any tutorial that
explains how to achieve this?
The manual is pretty clear on how to do it:

http://dev.mysql.com/doc/refman/5.0/...ion-howto.html

And here is a howto as well:

http://www.howtoforge.com/mysql_database_replication

Good luck!

Jonathan
Mar 24 '07 #6
Thanks for your help!

Antoni

Mar 26 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
4165
by: Terry A. Haimann | last post by:
I have a databse with jpg in a blob field. I want to back it up with mysqldump, but it appears to time out. Is there a way to limit the number of records backed up (possibly with the where clause,) so that I can backup my big table in blocks? Thx, Terry
7
7404
by: Adam Smith | last post by:
Hope this is the right news group!! I did a server upgrade and at the same time did a mysql update from 4.0.12 to Ver 12.22 Distrib 4.0.16 mach1# mysql --version mysql Ver 12.22 Distrib 4.0.16, for portbld-freebsd4.9 (i386) I attempted to restore the DB with
0
1431
by: Adam Smith | last post by:
Hello, I did a server upgrade and at the same time did a mysql update from 4.0.12 to Ver 12.22 Distrib 4.0.16. Essentially, moving from one machine to another. The dump consists of a cluster of databases, not just one and a few Tables. Now I'd like to restore the Database(s) ===>
0
2264
by: mcstayinskool | last post by:
I'm trying to dump a bugzilla installation to a file, then restore it to a different database name (so as to test my db backup system). I use mysqldump to dump it to a file: # mysqldump -u root -p<passwd> (misc. options) bugs > bugs.sql Then try to restore it to an empty DB, "foobar" with this command # mysql -u root -p<passwd> foobar < bugs.sql It fails, with this not-too-helpful error:
1
4031
by: Dave Crypto | last post by:
Hi there, SUMMARY: 1) When I use phpadmin to export a large database, the file created on my local PC never containes all the tables and information. It seems to max out at about 10mb. 2) Will running mysqldump from command line on a live in-use DB (with one table containing 350,000 rows) pose any risks and have any large effect of current use?
3
2320
by: Christopher Mouton | last post by:
We regularly make drive images of our entire server and store it at a backup site. To be honest I have never fully understood how the imaging programs deal with open files. My question is will the drive image make a good copy of MySQL DB or should I be running a mysqldump before doing the drive image?
6
5966
by: Todd Cary | last post by:
My client is using a shared server running MySQL 2.4, however the in house server is 4.1.12 with mysqldump 10.9. Is there a way to have the 10.9 version output a format that is fully compatible with 2.4? Some of the CREATE TABLE statements in 10.9 are not accepted by 2.4. Currently, I am not using any of the switches in creating the output file other than the -u, -h and -p. Todd
6
30084
by: Robert Blackwell | last post by:
I want to make a scheduled task in windows to do a mysqldump. Someone gave me this .bat to run but I'm not able to get it to work. 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
8
6288
by: lawrence k | last post by:
I've installed Apache 1.3.36 on my Redhat EL 3 machine. Now I'm trying to install PHP 5.1.4. I can not get the ./configure command to work. I keep getting this error: configure: error: Invalid Apache directory - unable to find httpd.h under /usr/local/apache/include So then I run this command: find / -name httpd.h
0
8466
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8896
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8810
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8590
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7410
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5683
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4208
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4387
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1790
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.