← Back to team overview

mylvmbackup-discuss team mailing list archive

Backup of replication slaves

 

If I wish to take a backup of a Mysql replicated slave, I am wondering if anything should be different as far as this program. I do not want to stop the slave mysql database, thus this software of course. However, it would seem to me that a stop slave command would be useful to get a consistent backup without having to worry about recovery, read locks, timeouts, etc. Seems like its cleaner and better perhaps than the current technique used. I believe more current MySQL versions actually wait for commands to complete before returning from a stop slave. So, when stopped, there should be zero things going on and therefore backup should be perfect without stopping MySQL and no worries about any other issues. Seems like roughly equivalent to doing a slave backup with mysql stopped. 

I have been using this with skip_flush_tables as I do not need a read lock, assuming the above statements are true. I have been using the presnapshot hook to stop the slave (and check for open temp tables and wait if any). And, the premount hook to start the slave back up. 

I’d be curious if anyone believes there is an advantage to using this technique for a slave over the existing methodology of mylvmbackup. If there is, then, perhaps a slave backup option could be added to do this? I have vague memories of timeout issues when waiting for read lock with large queries running and perhaps other issues causing backups to fail.

Steve