Skip to main content

How often can I back up our server?

Thread needs solution

Hello,

This is my first post on this forum and I hope to get my question across in a concise manner.

I am wanting to know if I can back up our server during working hours. We are a medical clinic that is open 12 hrs a day 6 days a week and open 6 hours on a Sunday. I run Acronis B&R 10 of which we started using for the last 4 months. (We went away from Symantec Backup Exec) The backup occurs nightly at 1:30 am and runs anywhere from 30 mins for an incremental to 100 mins for a full backup. We shut down mysql and tomcat via a script from 1-5 am. This gives us ample "quiet time" to perform the nightly backup.

We are open from 8 am to 8 pm but would love to backup on an hourly basis if possible using a differential backup and then a full backup at night. Is this possible without corrupting our mysql database? Would it be a verifiable backup? The reason I am asking this is our server crashed last Sunday and it took two days to get it back up and we almost lost 3 days of data (as the image we were able to restore from was 3 days old) but we were able to get two of them back so we ended up losing just a Sundays worth of data. I do not blame Acronis on this as there was a side by side OS install... whole other story there. (We run WS2k3 Standard btw...)

The day it crashed I was doing a manual backup at 11 am on normal priority without shutting down mysql and it looked as if the mysql db began its corruption right at the time our users started logging on at 12. By 3 the server had crashed. The backup ran from 11 am to 1 pm but was corrupt. Attempts to restore from that image were fruitless. Would running this bu at that time have caused the corruption in the mysql db?

Any advice would be appreciated,

Brian Smith

0 Users found this helpful

Hi Brian!

First of all I'm very pleased to know you have switched from Symantec to Acronis.

You can backup your servers even without stopping mysql, but in this cases the backup will be so called "crash consistent". This means that restoring to it will have impact similar to rebooting your server in a hard way, for example by turning off power. While such image can be restored, and verification should succeed, mysql will need to recover itself after a "crash", and there's a risk it will fail to do so.

That's why we recommend to stop mysql when snapshot is created. This will make sure that you backup is in "application consistent" state. Note that it is not necessary to have mysql down for entire backup - it's enough to stop it before snapshot is created and start immediately after (you can do it with pre/post commands). Usually creating snapshot takes no more than a few minutes.

In your situation I would recommend to have both nightly "application consistent" backups and more frequent "crash consistent" backups. In a case of disaster you can first try restoring to your latest  "crash consistent" backup (most likely it will work), but if mysql fails to recover - always have a 100%proof option to go back to "application consistent" backup.

P.S. Some other databases (like Microsoft SQL Server) that support VSS, it's enough to enable VSS in backup options instead of stopping the databases. By communicating with the applications, VSS will make sure they keep their data in "application consistent" state when snapshot is taken.

Regards,

Sergey Kandaurov

Thanks for your quick reply.

I did notice that we were setup using the backups with the VSS switched to off. That and the db was not being stopped. Both of these have been corrected. I will attempt to use the pre/post commands to stop the db for only the time needed for snapshot to take place.

I have tried using the pre/post commands earlier with no luck. I am a bit confused on them as I use the same .bat file and for the same directory and when I click the test button it fails.

I will start a new thread on this as you have answered my original questions.

Thanks,

Brian Smith

Dear Brian!

Thank you for your kind response!

We haven't heard from you for a long time, so I just wanted to specify whether everything is fine at the moment.

You have mentioned that you faced an issue with running the pre/post commands, could you please kindly specify the details of the problem in case it still persists, I would like to help you with it. Also please note that you can verify the batch files created at any time with the examples we have described here.

Let us know if you need any further assistance!

Thank you.