Copy mysql folder insteed of mysqldump

asmar

Verified User
Joined
Aug 29, 2005
Messages
99
Location
https://t.me/pump_upp
Hello all,

I would like to ask if there is any problem by copying the whole /var/lib/mysql insteed of getting backups via mysqldump.

I'm asking that as I am using a rsync script to get backups and it's easier than having another script to get mysqldumps (+load) and then rsyncing them.

Prons and cons?

Thanks
 
most of the time there won't be a problem, but the database can be changed during copying, so it could be a problem there.
 
You need to look into mysqlhotcopy

This is a program included with the MySQL server that essentially does what you're asking about, but it makes sure that the data doesn't change during the backup process, thereby eliminating the risk of corrupt data.
 
Back
Top