PowerShell script exchange
Post Reply
Outlaw
Influencer
Posts: 24
Liked: 4 times
Joined: Mar 28, 2018 9:22 am
Contact:

Select local repo

Post by Outlaw »

Hello

I`m was write small script for export backups

Code: Select all

$var = Get-VBRRestorePoint -Name vm | Sort-Object –Property CreationTime –Descending | Select-Object -First 1
Export-VBRRestorePoint -RestorePoint $var
How can I select repo for export ? If vm was backuped to 2 target(backup + backup copy) $var contain any from them. If $var contain local repo - quckly, if remote repo - slower.
Mildur
Product Manager
Posts: 8735
Liked: 2294 times
Joined: May 13, 2017 4:51 pm
Full Name: Fabian K.
Location: Switzerland
Contact:

Re: Select local repo

Post by Mildur » 1 person likes this post

Hi Outlaw

You could filter your restore point by the backup job, which targets your local repository.
Then you only have local restore points to export.

Code: Select all

$backup = Get-VBRBackup -Name "BackupJob"
$var = Get-VBRRestorePoint -Name "VMName" -Backup $backup | Sort-Object -Property CreationTime -Descending | Select-Object -First 1
Export-VBRRestorePoint -RestorePoint $var
Best,
Fabian
Product Management Analyst @ Veeam Software
Outlaw
Influencer
Posts: 24
Liked: 4 times
Joined: Mar 28, 2018 9:22 am
Contact:

Re: Select local repo

Post by Outlaw »

Hi Mildur

Magic :)
Thanx
Post Reply

Who is online

Users browsing this forum: No registered users and 25 guests