0

Our backups on our virtual windows server 2012 R2 which is hosted on Hyper-V server 2012 R2 have been taking at least 3 hours longer than they used to. We use windows Server Backup for nightly backups which backs up to a local volume. We also use a powershell script for the weekly backup which also runs through wbadmin and backs up to a network share. A couple weeks ago the backups started taking 3-5 hours longer. I monitored them and noticed that they have been taking hours to compact the virtual hard disks at the end of the backups. I refereed to the following link about this process and it should not be happening for every backup. http://support.microsoft.com/kb/2524602/en-us

We installed windows updates after this problem began but its is still happening for every backup. We have also tried configuring the backup performance for fast performance which only saved 20-30 minutes and the compacting of virtual hard disk still occurs.

What can we do to stop this?

-edit-

The nightly backup is a full system backup. The weekly backup is of the C: and D: (data) drives.

Weekly backup Powershell script:

#—————————————–Start script—————————————————-

function SendEmail($To, $From, $Subject, $Body, $attachment, $smtpServer)
{
         Send-MailMessage -To $To -Subject $Subject -From $From -Body $Body -Attachment $attachment -SmtpServer $smtpServer
}
$emailto_techsupport=
$emailto_owner=
$emailfrom=
$day=(get-date -f dd-MM-yyyy)
$hname="NAME"
$backuplocation= "\\NAME2.DOMAIN.WKS\NAME-WEEKLY"
$backupContents= "\\NAME2.DOMAIN.WKS\NAME-WEEKLY\*"
$backuplog="$backuplocation"+(get-date -f dd-MM-yyyy)+"-backup-$hname.log"
$emailserver="NAME3" 


function Out-FileForce {
PARAM($backuplocation)
PROCESS
{
    if(Test-Path $backuplocation)
    {
        Out-File -inputObject $_ -append -filepath $backuplocation
    }
    else
    {
        new-item -force -path $backuplocation -value $_ -type file
    }
}
}

#Delete contents of Backup location before we do a new backup
#Remove-Item $backupContents -recurse -Confirm:$false

Write-Output ("———————– Backup started on – $(Get-Date –f o) ————————-") | Out-FileForce "$backuplog"
$Error.Clear()
wbadmin start backup -backupTarget:$backuplocation "-include:d:,c:" -vsscopy -quiet | Out-FileForce "$backuplog"
if(!$?)
    {
        Write-Output ("———————– An error has occurred! Check it please!. – $(Get-Date –f o) ————————-") | Out-File "$backuplog" -Append
    SendEmail -To "$emailto_techsupport" -From "$emailfrom" -Subject "backup failed" -Body "The backup from NAME to NAME2 has failed! Please check attached log." -attachment "$backuplog" -smtpServer "$emailserver"
    break 

     }

Write-Output ("———————– Everything is OK! – $(Get-Date –f o) ————————-") | Out-File "$backuplog" -Append
SendEmail -To "$emailto_techsupport"  -From "$emailfrom" -Subject "Backup $hname OK" -Body "The NAME->NAME2 weekly backup  has succeeded!" -attachment "$backuplog" -smtpServer "$emailserver" .

#——————————————–End script——————————————————
2
  • Are you backing up entire volumes or only certain folders on your source volumes? Can you edit your question to include the exact WBADMIN command line with options that you're using? Oct 7, 2014 at 1:58
  • I've added the details you requested Twisty
    – DeBz
    Oct 13, 2014 at 14:52

0

You must log in to answer this question.