Why is it necessary to stop apps like databases before cloning?

Discussion in 'Acronis True Image Product Line' started by TMH, Aug 25, 2005.

Thread Status:
Not open for further replies.
  1. TMH

    TMH Registered Member

    Joined:
    Aug 25, 2005
    Posts:
    6
    Hi,

    I have read the forum and other sources of information on whether it is necessary to stop MS Exchange for example before taking an online image of a w2k3 server.

    The advice from Acronis is that Exchange and SQL Server should be stopped before the proceed button is pressed. They can be restarted soon after.

    Now I have two important questions:

    1.) What about all the other database that use similair technology like exchange (ESE)? This inlcludes WINS database, Active Directory database, Certificate Server Database. Do I need to stop them too and how di I do that?

    2.) Why is it neceassary at all? The database apps always work with the actual database files and transaction logs. When TI takes the sector level snapshot this snapshot is consistent because the database file together with the transaction logs is consitent too. The database file alone will not be consistent because not all transactions might have been written to it but they must be in the transaction logs as soon as they are commited. There is nothing in memory that could make the state inconsistent. So why should I stop an restart these kind of apps?
    When an image taken without stopping the database first is restored the database file and the logfiles will "fit" together. At the time the database is brought back online it might need a "soft" recovery because not all transactions are in the database file yet. This will lead to a transaction log replay like any other event that causes a soft recover - a power outage or crash of the database process. Am I correct abput this?

    Thanks in advance!

    Thomas
     
  2. FeanorKnd2

    FeanorKnd2 Guest

    A very very very good question...
    A pity pity pity nobody answers...
     
  3. BlueZannetti

    BlueZannetti Administrator

    Joined:
    Oct 19, 2003
    Posts:
    6,590
    I believe so, but stopping the database forces it to be in a defined and stable state. I assume that it is a conservative recommendation given the nature of the task and value of the data.

    Blue
     
  4. Acronis Support

    Acronis Support Acronis Support Staff

    Joined:
    Apr 28, 2004
    Posts:
    25,885
    Hello Thomas,

    Thank you for your interest in Acronis Server Disk Backup Software.

    Please read the following FAQ aticle describing the issue.

    Please also note that Acronis True Image Enterprise Server 8.0 allows you to use special batch files.

    You can find more information on how to create a special batch file which will automatically stop and start the complex applications like Microsoft SQL Server in section 5.11 of Acronis True Image Enterprise Server 8.0 User's Guide.

    Please also take a look at the following article describing how Acronis True Image creates an image of a partition.

    Thank you.
    --
    Alexey Popov
     
  5. TMH

    TMH Registered Member

    Joined:
    Aug 25, 2005
    Posts:
    6
    That's what I did. My questions are still unanserwered. It is still unclear why it is necessary.

    Thanks I also have read about that feature.

    I read that too and the way I understand the mechanism it should be no problem in case the database is not stopped. Please see my inital posting again.

    Thank you.
     
  6. SonuS

    SonuS Guest

    A sysadmin here has mentioned that when they take backups using another method, they do so with all applications shut down because of lock files.

    Some programs will place a 'lock' on certain files when in use.

    From what I'm told, when you take an image without first shutting down applications, restore it, and then try to run some of those applications, you may get errors such "another instance already in use", or abnormal program behaviour because of pre-existing locks.

    They find it easier to shut down applications cleanly, then take an image, rather than fighting with them later...
     
  7. Acronis Support

    Acronis Support Acronis Support Staff

    Joined:
    Apr 28, 2004
    Posts:
    25,885
    Hello Thomas,

    The point is that the running database usually stores a huge amount of data in the computer's RAM, while Acronis True Image creates an image of the data stored on the hard drive only. In other words the data placed in the RAM will not be backed up. That will cause the database malfunction after you will restore your image archive.

    If you will temporarily stop your complex applications they will write all the important information on the hard drive, so you will be able to create an image of this data without a problem.

    If you have any further questions please feel free to ask.

    Thank you.
    --
    Alexey Popov
     
  8. TMH

    TMH Registered Member

    Joined:
    Aug 25, 2005
    Posts:
    6
    Alexey thanks for your answer. RAM is the only thing I can image that would be causing problems.
    But in case of an exchange ESE database all actual data will be either in the database or in the transactions logs. That is the whole point about transaction logs. Once a transaction is comitted the data might still be in RAM but is guaranteed (!) to be also in the log file. In case of an abnormal program termination this data is then save because it is in the logs (of course you will need a recoverable disk write cache or turn it off).

    So what actually is in RAM for the application in question might be other data that is generation at runtime (internal information of the program).
    In case of an abnormal program termination (crash) this is also gone. That should be no problem. The actual data that belongs into the data base might not be there yet but it is in the logs and when the database is restarted the logs are replayed and the data is put into the database files (see my initial post -> softrecovery).

    The issue with data in RAM is holds true for every application running not just databases. So if that were an issue one would need to stop all apps and thus not be able to do an online backup like TI does.

    So I still figure that database ups mustnot be stopped in the same way as other apps must not be stopped either.

    What do you think about that?
     
  9. Acronis Support

    Acronis Support Acronis Support Staff

    Joined:
    Apr 28, 2004
    Posts:
    25,885
    Hello TMH,

    According to the article Alexey gave you, there may be a problem with synchroniziation of different parts of data base. This happens because you have running transactions during the backup creation. Even the transaction logging that prevents problems with RAM data loss cannot help with it. Briefly, it will look like different entries of data base are backed up on different time - though the difference sometimes is less than a second it may be enough to corrupt the data base. I am afraid we will not be able to provide you with more details on this and we can just recommend that you stop the complex services before the snapshot is taken to resume after it is taken to prevent the corruption of data base.

    Thank you.
    --
    Ilya Toytman
     
  10. TMH

    TMH Registered Member

    Joined:
    Aug 25, 2005
    Posts:
    6
    Could you please explain what you mean with different parts of the database. Parts of one file? I don't understand.

    Where do we draw the line between complex and non complex applications then?

    Thanks.
     
    Last edited: Aug 28, 2005
  11. TMH

    TMH Registered Member

    Joined:
    Aug 25, 2005
    Posts:
    6
    No more answers?
     
  12. Jumping

    Jumping Registered Member

    Joined:
    Apr 18, 2005
    Posts:
    47
    I have backed up 2 sql databases so far without shutting them down, and they have been working fine after restore.

    The reason why I had to do this is because if I schedule the databases to stop it involves a lot of work to be done on everything that writes to the databases.

    I can see why Acronis recommends it, but so far its worked ok without doing so. If the database would become broken during a restore we would simply restore it from the transaction logs and the database snapshot.
     
  13. TMH

    TMH Registered Member

    Joined:
    Aug 25, 2005
    Posts:
    6
    One more questions: How do I correctly stop the Active Directory and what are the implications of doing this. Is it possible at all?
    As mentioned above it is necessary to stop all complex / database apps. Active Directory is one of those. How can it be stopped and restarted? Will I still be able to do an TI Incremental Backup once it is stopped? What about authentication then?

    Looking forward for any answers / experience about/with this issue.

    Thanks a lot.
     
Thread Status:
Not open for further replies.