PDA

View Full Version : Has anyone else been able to do this backup?


cirisme
Wed 5th Nov '03, 4:57pm
Erwin has talked about his backup method of copying the MySQL files directly and copying them to get a full backup.

Well, this is looking very appealing to me. Cpanel's backups always cause the server load to jump well above 150... sometimes even to 300, and MySQL's dump utility gives out about 100 megs before it's complete.(watchdog kills any processes that go longer than 5 minutes which is why)

I was wondering what was required to make this work without corrupting the files and getting the safest backup.

I'm guessing the script would shut down apache(to prevent the vb database emails), and mysql, copy the files, then start mysql then apache. If mysql doesn't want to start, how can you prevent Apache so you don't get thousands of emails from vb?

If any generous soul wants to share their scripts, that would be great! ;)

eva2000
Thu 6th Nov '03, 11:20pm
not recommended... use mysqldump and kill that watchdog app instead ;)

AWS
Sat 8th Nov '03, 12:24am
mysqlhotcopy is what I use and probably what Erwin uses. You have to shutdown mysql to use it and it doesn't kill the server.
You can gzip or zip the whole folder in the data dir and untar/unzip back into the data dir in case you need to restore. Just make sure mysql is not running. This is a recommended way to do a backup with a large db documented in the mysql docs. I have done it many times when moving from one server to another and never had a problem with corrupt db like I do at times when using mysqldump.