PowerShell script exchange
Outlaw
Influencer
Posts: 24 Liked: 4 times
Joined: Mar 28, 2018 9:22 am
Contact:
Post
by Outlaw » May 10, 2023 11:32 am
this post
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:
Post
by Mildur » May 10, 2023 12:25 pm
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:
Post
by Outlaw » May 10, 2023 1:17 pm
this post
Hi Mildur
Magic
Thanx
Users browsing this forum: No registered users and 25 guests