I
I
iamguyfawkes2014-04-01 05:36:33
MySQL
iamguyfawkes, 2014-04-01 05:36:33

MySQL Backup InnoDB, why is the server hanging?

Tell me, please, how to make backups of databases of a couple of gigabytes (in compressed form) so that they do not hang up the server and the site remains available?
There is a script on the crown that executes

/usr/bin/nice -n20 /usr/local/bin/mysqldump -q -uroot -p*** $db > $FILE

then it zips it, but that's not the point.
In top, the mysqldump process with priority 20 hangs for several hours, which dumps the database to a file, but the site is not available from time to time due to the fact that MySQL cannot be reached and throws a 504 error. ..
All tables in InnoDB, OS FreeBSD, MySQL 5.6

Answer the question

In order to leave comments, you need to log in

7 answer(s)
P
Puma Thailand, 2014-04-01
@opium

I was able to achieve the site not dying on a large database backup like this
nice -n 19 ionice -c2 -n7 mysqldump --quick --single-transaction

V
Vitaly Inchin ☢, 2015-08-13
@buxo

So?
This is a bad example to parse - better work with text.

A
Andrey Burov, 2015-08-13
@BuriK666

Use DOMDocument or SimpleXML

V
Vladislav Gaiduk, 2015-08-13
@Danan

simplehtmldom.sourceforge.net is a simple library and very handy

B
buxo, 2015-08-13
@buxo

Vitaliy Inchin , please advise where else you can read about it (?:) (?!) And generally understandable documentation in Russian on RegExp, otherwise they write everywhere either "for beginners" (without affecting complex structures) or too complicated, without examples , falling asleep with a huge number of terms that are also not explained in detail.

O
Oleg, 2015-08-13
@hobo-mts

(?:) -- no capture clustering, (?!) -- negative look ahead. See Jeffrey Friedl's "Regular Expressions" and The Camel Book (it grows from there).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question