Forum Discussion

V4's avatar
V4
Level 6
14 years ago

Exchange / SQL Log truncation

Hi All,

Need few clarifications on log truncation. Correct me if i'm wrong here.

Transaction logs are getting generated as database (Exch/SQL) would be busy with other task , as soon as it gets free logs get commited and DB size is increased (i.e. Previous DB size + Log size = Addition of both).

 

As now almost all the application aware backup utlity can back up these applications and sends instruction to truncate the logs post successful FULL backup.

My query is During the backup of Exchange i believe IS would be used as backup selection (directive) and all the database would get backed up. I believe  this backup DOES NOT includes Transaction logs. After backup DB is instructed to get the logs commited. (True or false).

 

Also this logs truncation process seems to be automated mechanism within Exchange  / SQL etc. So if we have snapshot backups of DB and logs and if DB snapshot is bit older then the logs snapshot so this synchronization should fail.(True or False pls explain)

 

If we use individual DBs or selected DBs to be backed up will logs get truncated.? Are logs also associated to respective DBs ?

 

 

  • OK

    I dont think you could do a DB from 2 weeks ago follwed by yesterdays logs - things just would not match

    A differential incremental will truncate the logs if successful and all replicas up to date

  • Hi,

    Exchange backup have its own feature that when database backup will complete then all the transaction logs goes to be deleted.

    In the exchange the process is as follows:

    First every transaction write in the trasaction log file and after completion of a process this trasaction will be write into Exchange database.

    If you have a snapshot of DB and logs snapshot of new logs then it might be not get effect to synchronization.

    •     Full Backup - which backs up the Exchange databases and transaction logs and will then have Exchange truncate the logs after a successful backup.
    • ·   Differential Incremental Backup - which backs up Exchange transaction logs only and will then have Exchange truncate the logs after a successful backup
    • ·   Cumulative Incremental Backup - which also backs up Exchange transaction logs only but will not have Exchange truncate the logs after a successful backup; and
    • ·    User Backup - which will allow an Exchange backup to be initiated from the client during an open Start Window.
  • This is true about exchange backup types and this is depend on the organization's need that what they want to configure.

    According to me the best backup configuration should be as:

    1. Full Backup - which backs up the Exchange databases and transaction logs and will then have Exchange truncate the logs after a successful backup.

    2.   Differential Incremental Backup - which backs up Exchange transaction logs only and will then have Exchange truncate the logs after a successful backup

     

  • If you are doing a correct exchange backup (meaning a NB exchange policy)

    When doing a backup you should also be getting the logs.

    So if you go into the BAR and look at your backup you should see the Mailstore or dag (you don't say what version of exchange) AND the logs - as you need both to do a restore.

  • Hi,

    When you backup an Exchnage server, it's better to create a backup policy fot your IS, public directory, etc..

    But if one of them finish with status code 1, your log can't truncate

     

    Best regards

  • In addition to the previous post - if you create an individual policy for each item (so a policy for each Storage Group, one for Public etc.) then the logs will still get truncated for each successful one.

    If you have one policy with all items as streams within it then if any one fails none of the logs will get truncated.

    So to answer your original questions ....

    1. When you run a full backup the IS and all logs get backed up, if successful and exchange has no internal issues (such as a replica not being up to date) then the logs get trucated after the backup (though not always immediately)

    2. Snapshots will truncate those logs backed up in the snapshot - again only as long as replicas are up to date

    3. Individual DBs have their own logs truncated if successful and in their own policy - as per my note initially

    Hope all of this helps and your questions have been answered

  • Hi,

    according to my knowledge, we should configure Weekly Full backup of Exchange database and daily Differential Incremental Backup for DAG (Exchange Database.)

  • Guys

     

    Thanx for sharing your valuable views and knowledge.

     

    Though my query is still unanswered.

     

    is it possible to manually replay transaction logs

    e.g. Last DB backed up (two week ago)

    Transaction log (latest one)... Possibilities???

     

    Does differential incremental backup truncates logs upon successful completion?

  • OK

    I dont think you could do a DB from 2 weeks ago follwed by yesterdays logs - things just would not match

    A differential incremental will truncate the logs if successful and all replicas up to date