PDA

View Full Version : MySQL, full system backup


casufi
08-13-2004, 07:08 AM
Hello.

I have a problem with full mysql backup. In order to backup all database I make the following steps:

1) mysqladmin shutdown
2) tar /var/lib/mysql/
3) /etc/init.d/mysql start

But during the backup process some directadmin demon start mysql again. How I can disable this demon?

jlasman
08-15-2004, 12:21 PM
DA will attempt to restart all nonrunning essential services every minute if they're not shut down using the DA control panel.

Jeff

casufi
08-29-2004, 01:35 AM
Can I shutdown MySQL server using DA script from the command promt. I nee to set up automatic backup script.

Icheb
08-29-2004, 02:08 AM
What do you guys do when you have a server with some clients that use their site/db really 24 hours a day. Everytime i run a system backup the MySQLD shuts down for a min causing their stuff to fail.
So everytime i run a sql backup, i get complaints.

Isn't there a way to backup it db by db without downtime ?

jlasman
08-29-2004, 09:25 AM
Since no backup is instantaneous, and no write to mysql is instantaneous, the risk of having an inconsistent backup is very high if you don't shut down MySQL.

One way to do it would be to use the replication system built in to MySQL to create another copy of the database on another server.

Then on that other server, shut down MySQL and back it up. When you turn MySQL on that server again, the replicate feature will catch up with the replication after a short time.

DA shuts down mysql for as short a time as any system I know of. My guess is that any company using MySQL so intensively that they can't handle a one or two minute downtime at some point in 24 hours probably needs their own server. Certainly they're using a lot of resources on any shared server they're on.

Jeff

Daijoubu
10-27-2004, 06:21 PM
Lock the tables?
But then, it may drive up the load since all queries will have to wait...