Backing up the real folder in which the database is stored comes, as you noticed, with some problems. Files can change when the folder is copied, which can lead to a damaged backup or (if you lock everything), which makes it impossible for MySQL to write (or possibly even read) the database, which is also not very good (TM).
One workaround is to back up a folder through a file system snapshot. I donβt know if NTFS supports this, but a quick google search found something called Shadow Copy. You can look at it.
Then, as pilsetnieks has already pointed out, you can run mysqldump in InnoDB tables using the --single-transaction option.
If you were on Linux, I would recommend you try Percona Xtrabackup , which has everything you could wish for. They have released a version of Alpha for Windows . It may be worth the look.
source share