PowerShell script exchange
Post Reply
Veeam Software
Posts: 1617
Liked: 566 times
Joined: Mar 02, 2012 1:40 pm
Full Name: Timothy Dewin

Bandwidth guesstimation for remote copy (existing backups)

Post by tdewin » 1 person likes this post

Wrote this quickly, nothing to fancy. It just takes the latest increments of every Backup, adds the increments, then divides by a copy window of 8 hours. Should give you a crude number of bandwidth requirements without WAN acceleration in Mbit/s. It uses the compressed backup size.

If some people could verify, that would be great cause it is written fairly quickly.


Code: Select all

 asnp veeampssnapin

 # 8*60min*60sec
 $copywindow = 8*3600
 $backups = @()
 get-vbrbackup | ?  { $_.JobType -match "^Backup$" } | % { 
    $storages = $_.getStorages()
    $incs = @($storages | ? { -not $_.isFull } | Sort-Object -Property CreationTime -Descending)
    if ($incs.Count -gt 0) {
        $inc = $incs[0]
        $backups += New-Object  PSObject -Property @{name=$_.JobName;file=$inc.filepath;backupsize=$inc.Stats.BackupSize}
        write-host ("No inc for {0}" -f $_.JobName )


$total = $backups | Measure-Object -Property backupsize -Sum
$bytes = $total.Sum
$bytespersec = $bytes/$copywindow
$mbitpersec = $bytespersec*8/1MB
Write-host ("Guesstimating {0} Mbit/s" -f $mbitpersec)
Should give you something like the following. It will also tell you if you don't have incs. Watch out, in this case, nothing is counted!!!

Code: Select all

No inc for Windows Environment
No inc for Backup Job 8

                                                    backupsize name                                                           file                                                         
                                                    ---------- ----                                                           ----                                                         
                                                    2144796672 Backup Job Dima                                                V:\Backup\Backup Job Dima\Backup Job Dima2015-05-14T220129...
                                                     294258688 Backup Job Windows                                             V:\Backup\Backup Job Windows\Backup Job Windows2015-05-14T...
                                                      31649792 Backup Job check indepent                                      V:\Backup\Backup Job check indepent\Backup Job check indep...
                                                   12893234688 Backup Job CBT                                                 V:\Backup\Backup Job CBT\Backup Job CBT2015-05-12T184651.vib 
                                                      37475328 Backup Job Linux                                               V:\Backup\Backup Job Linux\Backup Job Linux2015-05-14T2201...
Guesstimating 4,07998168945312 Mbit/s

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests