PowerShell script exchange
Post Reply
LeoKurz
Veeam ProPartner
Posts: 28
Liked: 7 times
Joined: Mar 16, 2011 8:36 am
Full Name: Leonhard Kurz
Contact:

Repository of Restore Point

Post by LeoKurz »

Newbie question:

How can I get the repository of a specific restore point?

__Leo
PTide
Product Manager
Posts: 6551
Liked: 765 times
Joined: May 19, 2015 1:46 pm
Contact:

Re: Repository of Restore Point

Post by PTide »

Hi,

Please give some details about your plan - what do you call 'specific restore point'? Is it specific by date, by sequence number, something else?

Here is general approach that might give you an idea.

1. With Get-VBRRestorePoint you can get a desired restore point to search for. Example:
This command looks for the latest restore point of a VM named "MSExchange02" in the backup named "MSExchange Backup". The backup is obtained with Get-VBRBackup and piped down. The restore points of the VM are filtered with Sort-Object method by the "CreationTime" property to get the most recent one.

Code: Select all

$RP = Get-VBRBackup -Name "MSExchange Backup" | Get-VBRRestorePoint -Name *MSExchange02* | Sort-Object $_.creationtime -Descending | Select -First 1
2. Next, you need to find the repo the point resides at:

Code: Select all

$RP.GetRepository()

Info                     : Veeam.Backup.Model.CBackupRepositoryInfo
Id                       : c227d370-8c8a-472a-935e-7937642655e4
Name                     : REPO_NAME
HostId                   : 6745a759-2205-4cd2-b172-8ec8f7e60ef8
MountHostId              : 6745a759-2205-4cd2-b172-8ec8f7e60ef8
Description              : DESCRIPTION_HERE
Path                     : PATH_HERE
FriendlyPath             : FRIENDLY_PATH_HERE
ShareCredsId             : 00000000-0000-0000-0000-000000000000
Type                     : WinLocal
IsTemporary              : False
TypeDisplay              : Windows
IsRotatedDriveRepository : False
EndPointCryptoKeyId      : 00000000-0000-0000-0000-000000000000
Options                  : Veeam.Backup.Core.CDomBackupRepositoryOptions
IsSanSnapshotOnly        : False
IsDedupStorage           : False
Is that what you need?

Thank you.
Post Reply

Who is online

Users browsing this forum: No registered users and 20 guests