Bash script to sync backup server

I wonder how this should be related to ownCloud? Looks more like an issue in your deployment / backup way or an issue of mysql itself.

You might still be able to get the reason for this by checking your logfiles [1].

[1]