0

I'm using Dell Avamar native Exchange Agent to Full-Backup the Databases on a Stand-Alone Exchange 2013 Server (latest updates and patches). It uses VSS.

It's not an Agent issue, since at the end of the Backup we correctly get Windows Event 2046:

The Microsoft Exchange Replication service VSS Writer instance xxxxx has successfully completed the backup of database 'XXXXXXX'

Database log truncation has been requested for this database. Log truncation will occur on the active copy after the next log generation is created.

But the logs keep piling up at a rate of 560 logs a day.

I've confirmed that CircularLogging is disabled and LastFullBackup attribute gets correctly populated.

What am I missing?

rui
  • 25
  • 4

3 Answers3

1

If anyone else is reading this post, the logs started magically being correctly purged 3 days after I posted for help. I'm closing the issue, but I'm not very assured, since magic is something I don't like in IT.

Let me share the Powershell script I created as a workaround so I didn't run out of space meanwhile

The script:

  1. Checks if The MailboxDatabase is Mounted
  2. Enables Circular-Logging
  3. Dismounts the MailboxDatabase
  4. Mounts the MailboxDatabase

The logs get purged

  1. Disables Circular-Logging
  2. Dismounts the MailboxDatabase
  3. Mounts the MailboxDatabase

`

Add-PSSnapin Microsoft.Exchange.Management.PowerShell.SnapIn    

#################  Functions  ###############

Function MandaMail{
    Param ( [string]$assunto,[string]$texto )
    Send-MailMessage -To “<recipient@domain.com>” -From “<sender@domain.com>”  -Subject $assunto -Body $texto -SmtpServer “smtp.server.domain”
}

Function IsMounted{
    Param ( [string]$mdb )
    return [System.Convert]::ToBoolean($(Get-MailboxDatabase $mdb -Status | foreach { $_.Mounted}))
}

Function ReiniciaMDB{

    Param ( [string]$mdb )
    
    Start-Sleep -Seconds 5

    Write-Host "   ...vamos desmontar a Mailboxdatabase:"$mdb
    Dismount-Database -Identity $mdb –confirm:$false 
    Start-Sleep -Seconds 10
        
    Write-Host "   ...confirmar se desmontou... "
    if (IsMounted($mdb)) {
        Write-Host "   ...ERRO ao desmontar -> return False "
        return $false }
    Else {
        Write-Host "   ...ok, desmontou."
        Write-Host "   ...vamos montar a Mailboxdatabase:"$mdb
        Mount-Database $mdb
        Start-Sleep -Seconds 5

        Write-Host "   ...confirmar se montou..."
        if (IsMounted($mdb)) {
            Write-Host "   ...ok. montou"
            return $true }
        Else {
            Write-Host "   ...ERRO ao montar -> return False "
            MandaMail -assunto "Exchange | PurgeTransLogs | ERRO ao montar:"$mdb -texto "." 
            return $false}
    }


}


Function LimpaTransLogs{

    Param ( [string]$mdb )

    if (IsMounted($mdb)) { 
        Write-Host "...a MDB "$mdb" esta montada. /n ...activar o circular logging..: "
        Set-MailboxDatabase -Identity $mdb -CircularloggingEnabled:$true        

        Write-Host "...reiniciar a MBD run1... "
        If (ReiniciaMDB($mdb)) {
            Write-Host "...reiniciou com SUCESSO. /n ...desactivar o circular logging..: "
            Set-MailboxDatabase -Identity $mdb -CircularloggingEnabled:$false

            Write-Host "...reiniciar a MBD run2..: "
            If (ReiniciaMDB($mdb)) {
                Write-Host "...reiniciou com SUCESSO."
                MandaMail -assunto "Exchange | PurgeTransLogs | SUCESSO " -texto "." 
                Write-Host "...FIM!" 
                return $true}
            Else {
                Write-Host "...algo não correu bem :("
                return $false
            }
        }
        Else { Write-Host "...nao reiniciou a MBD run1" }
    }
    Else { 
        Write-Host "...A MDB "$mdb" nao estava montada" 
        MandaMail -assunto "Exchange | PurgeTransLogs | ERRO: nao estava montada " -texto "." 
    }

}

#####################################################################

LimpaTransLogs("MailboxDatabase_01")
LimpaTransLogs("MailboxDatabase_02")
rui
  • 25
  • 4
  • Anyway, glad to know this project is completed. You could choose the most helpful post above and mark it as the best answer, this will make answer searching in the forum easier and be beneficial to other community members as well. – Aaron Mar 09 '22 at 06:01
0

Have you reviewed this document? EXCHANGE DAG 2016 : Transaction Logs are not truncated if a database copy exists through veeam backup - Microsoft Q&A In this case, the OP said that you have to select all disk that contains Active & Passive database drives in the backup to flush the logs properly.

Aaron
  • 359
  • 4
  • Hello, Aaron. That only applies to DAG landscapes. This server is stand-alone. That's what makes the whole thing most intriguing. – rui Mar 05 '22 at 15:09
0

You could consider that enable the Circular logging, It would help you to reduce the log size of the databases Exchange 2019: Enable Circular logging on a Database - TechNet Articles - United States (English) - TechNet Wiki (microsoft.com)

Aaron
  • 359
  • 4
  • Yes, Aaron, I do that as a workaround on the post-script after successfull backup to purge the logs, and then disable it again so I don't lose the ability of performing incremental-backups. But that's a workaround. This has to work flawlessly. It's a Windows VSS feature. Hasn't anyone else run into this? – rui Mar 09 '22 at 00:47