cancel
Showing results for 
Search instead for 
Did you mean: 

How to Truncate Log After SQL Server Backup

legioon
Level 4

Hello,

i'm using BackupExec 2010 R2 Sp1 and using this scenarion at attach for backup of SQL Data.

But I want to truncate SQL log after finished backup. is this scenario correct ? or what is correct operation for this scenario ?

Because this will result in the log growing to fill all available disk space..

Thank you very much.

 

7 REPLIES 7

CraigV
Moderator
Moderator
Partner    VIP    Accredited

Hi,

 

I'd suggest checking into the option under Backup Method:

 

* Log - Back up and truncate transaction log

 

run this after doing the full SQL backup. It'll back up the transcation log, and then remove any transactions that were committed.

 

Thanks!

Hywel_Mallett
Level 6
Certified

As Craig says, you need to run transaction log backups as well as "normal" database backups in order for the transaction log to be purged.

The easiest way to do this is to run the transaction log backup straight after the full backup, which you can do using a policy.

Alternatively, if you need a shorter recovery point objective for SQL, you can schedule additional transaction log backups during the day. I do them hourly for example.

legioon
Level 4

there is no "Log - Back up and truncate transaction log" option in drop down menu..

i think you mean " Log - Back up transaction log" is this correct ?

CraigV
Moderator
Moderator
Partner    VIP    Accredited

...I am running R2, and that's the option I have. So that must be it...

Hywel_Mallett
Level 6
Certified

It is. I guess they must have changed the wording in later lreeases to clarify this - it's something that comes up a lot.

legioon
Level 4

there is no this option.. i'm using 2010 x64 r2.

you can see my version at attach..

CraigV
Moderator
Moderator
Partner    VIP    Accredited

Hi,

 

You're actually using BE 2010.

BE 2010 R2 is rev. 4164

 

That's the reason for the wording difference, although I have NO idea why they would do that!

 

Thanks!