Exchange DiskShadow/Robocopy backup does not purge log files

Posted by Robert Allan Hennigan Leahy on Server Fault See other posts from Server Fault or by Robert Allan Hennigan Leahy
Published on 2012-04-17T20:38:26Z Indexed on 2013/11/03 22:01 UTC
Read the original article Hit count: 336

I have a series of scripts setup to backup my Exchange. The following command is executed to start the process:

diskshadow /s C:\Backup_Scripts\exchangeserverbackupscript1.dsh

This is exchangeserverbackupscript1.dsh:

#DiskShadow script file

set verbose on
#delete shadows all
set context persistent
writer verify {76fe1ac4-15f7-4bcd-987e-8e1acb462fb7}
set metadata C:\Backup_Scripts\shadowmetadata.cab
begin backup
add volume C: alias SH1

create

expose %SH1% P:
exec C:\Backup_Scripts\exchangeserverbackupscript1.cmd
end backup
delete shadows exposed P:
exit
#End of script

And this is exchangeserverbackupscript1.cmd:

robocopy "P:\Program Files\Microsoft\Exchange Server\Mailbox\First Storage Group" "\\leahyfs\J$\E-Mail Backups\Day 1" /MIR /R:0 /W:0 /COPY:DT /B

This is not causing Exchange to purge its log files. The edb file is 4.7 gigabytes, but the First Storage Group folder itself is 50+ gigabytes due to many, many log files for each day going back to 2009.

Is there any way -- I've Googled and haven't found anything -- to notify Exchange when I've completed a full backup, and have it purge its log files?

According to this and this, end backup should cause Exchange to "flush the transaction logs for that storage group" but only "if a successful backup of a storage group occurred", which leaves my question as:

What constitutes a "successful backup", and why is what I'm doing not it?

© Server Fault or respective owner

Related posts about windows-server-2008

Related posts about backup