How to obtain some "Shadow Snapshot is done" signal from hobocopy while files are still copying?

71 views
Skip to first unread message

kir...@gmail.com

unread,
May 29, 2013, 2:22:03 PM5/29/13
to hobo...@googlegroups.com
Hello!

Hobocopy looks like very good tool for hot backing up working database under Windows.
It can be done straightly. However, to keep data consistency, it is better to provide some prepearing of DB before copying will be started.
Here is full scenario:
1. Flush and lock all DB tables via "FLUSH TABLES WITH READ LOCK".
2. Make Shadow Snapshot (takes a bit of time).
3. Unlock DB tables. 
4. Copy DB files from Shadow Snapshot (can take a lot of time).

With such scenario DB will be in read-only state for a short time suitable to keep normal work conditions.
The question is: how to get some "Shadow Snapshot is done" signal from hobocopy?
With it the practical scenario will be next:
1. Flush and lock all DB tables via "FLUSH TABLES WITH READ LOCK". DB switched into read-only state.
2. Run hobocopy.
2a. Asynchronously wait for hobocopy to make Shadow Snapshot.
3. Unlock DB tables (hobocopy still works). DB returns into fully working state.
4. Hobocopy are copying DB files from Shadow Snapshot.

The only way to wait "Shadow Snapshot is done" signal which I see now is to switch hobocopy verbosity to 4, send hobocopy console output into file or stream and wait for "Call to DoSnapshotSet finished." line in it. Not bad solution but slightly "duct-tapish".

Any thoughts?

Thanks!


Craig Andera

unread,
May 29, 2013, 2:24:22 PM5/29/13
to hobo...@googlegroups.com, kir...@gmail.com
My understanding of the Volume Shadow Service (on which hobocopy is
based) is that it broadcasts messages to subscribers to let them know
a backup is about to start. Databases would respond by flushing
consistent state to disk.

Did you try running hobocopy without flushing? Did it result in corruption?
> --
> You received this message because you are subscribed to the Google Groups
> "hobocopy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to hobocopy+u...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Kirill Pankin

unread,
May 29, 2013, 2:43:52 PM5/29/13
to hobo...@googlegroups.com, kir...@gmail.com, can...@wangdera.com
Big thanks for such fast reply! 

Yes, you're right. VSS subscribers is the right way. 
But, unfortunally, MySQL has not VSS subscriber functionality. There some commercial enterprise tools which have it but I can't use them for my work.
At the other hand, running shadow or plain backup of MySQL databases of any format without flushing is a big lottery. I've read many detailed explanations on it.
Hence, the only way to gently provide backup in my case is to simply get some "ready" signal. Maybe there is some more ummm... intellectual way to get this signal with backup script instead of parsing textual console output?

Thanks!

Craig Andera

unread,
May 29, 2013, 2:52:27 PM5/29/13
to Kirill Pankin, hobo...@googlegroups.com
There's nothing built in to hobocopy other than the console output
that would provide the signal you want. I suppose it might be possible
to write a VSS subscriber that would somehow signal you.

Sorry I can't be more help.

Kirill Pankin

unread,
May 29, 2013, 3:02:30 PM5/29/13
to hobo...@googlegroups.com, Kirill Pankin, can...@wangdera.com
Well, console output is not bad at all if there is no other ways.
The only thing which I can "request" is to include somethig like "Call to DoSnapshotSet finished" line into output with verbosity is 2 or 3, because verbosity 4 produces very big log (1-2 MB on my PC) which is not good for console script processing.

Thanks for you work!


среда, 29 мая 2013 г., 21:52:27 UTC+3 пользователь Craig Andera написал:

Craig Andera

unread,
May 29, 2013, 3:19:17 PM5/29/13
to Kirill Pankin, hobo...@googlegroups.com
Hi Kirill. I'm no longer updating hobocopy, so I don't see that change
getting made any time soon. Probably never. :( That said, the project
is open source, so you are more than welcome to make the requisite
edit yourself.

Sorry I can't be more help.

Kirill Pankin

unread,
May 29, 2013, 4:07:06 PM5/29/13
to hobo...@googlegroups.com, Kirill Pankin, can...@wangdera.com
No questions, Craig. I fully understand you.
I will think about some development.

Thanks again!
  

среда, 29 мая 2013 г., 22:19:17 UTC+3 пользователь Craig Andera написал:
Reply all
Reply to author
Forward
0 new messages