Comprehensive data protection for all workloads
Post Reply
2Tall
Novice
Posts: 6
Liked: never
Joined: Jan 04, 2012 9:28 am
Full Name: Philip Horan
Contact:

Backup Schedule - Synthetic Full

Post by 2Tall »

Hi. I currently have 2 Veeam jobs that target a HP D2D device (Backup 1 and Backup 2). Both jobs have incrementals scheduled each day with a synthetic full taken on a Sunday. I now have a script that pushes that last Veem backup to tape. The synthetic fulls are too large to fit on a single tape so I have to split them over 2 days. The current schedule will mean I have 2 .vbk files created on a Sunday. I will backup 1 to tape on Monday morning (schedules task calling powershell script). Veeam will then run Monday night. Tuesday morning my script will push Monday's vib file to tape rather than the second vbk file created on Sunday.

I plan to shift the synthetic full for Backup 2 to Monday (rather than Sunday).

Now is there a question in this post.......after writing it im not so sure :)

What do others do? My script is below, is there a better way to archive to tape?

Script

Code: Select all

# Remoting must be enabled on the BackupExec Server 
# And user must have access to complete task on Veeam and BE

if ((Get-PSSnapin -Name VeeamPSSnapIn -ErrorAction SilentlyContinue) -eq $null) {
	Add-PsSnapin VeeamPSSnapIn
}

$veeamJobName = "Backup 1"
$backupExecJob = "Veeam Backup 1" 
$backupExecSvr = "MY-SERVER"
$backupExecPath = "C:\Program Files\Symantec\Backup Exec"

if ((Get-VBRJob | ?{$_.Name -eq $veeamJobName}).GetLastResult() -eq "Success") {
	$latestOib = Get-VBRBackup | ?{$_.JobName -eq $veeamJobName} | Get-VBRRestorePoint | Sort CreationTime -Descending | Select -First 1
	$latestOib
	$storage = $latestOib.GetStorage()
	$storage.FilePath

	$file = Get-Item $storage.FilePath
	if ($file.Attributes -band ([System.IO.FileAttributes]::Archive)) {   
		Invoke-Command -ComputerName $backupExecSvr -ScriptBlock {
			param (
				[PSObject]$storage,
				[PsObject]$file,
				[String]$backupExecJob,
				[String]$backupExecPath
				)
			
			& "$backupExecPath\bemcmd.exe" -o2 -j:$backupExecJob -s:$storage.FilePath -m MediaName -r -w
			$file.Attributes = 'Archive'
		} -Argumentlist $storage, $file, $backupExecJob, $backupExecPath
	}
}
Kind Regards,
Phil.
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 73 guests