PowerShell script exchange
Post Reply
EWMarco
Service Provider
Posts: 39
Liked: 7 times
Joined: Feb 20, 2023 9:28 am
Full Name: Marco Glavas
Contact:

PowerShell question about Backup location

Post by EWMarco »

Hi everyone

We are in the process of implementing S3 storage as a capacity tier in our SOBR.

The issue is that we have a LOT of data to migrate and so far only found the option of manually clicking through backup properties of each job to find out which backups had already been copied.

Is there a PS way in v11 to determine the tier locations of each individual backup vib and vbk?

Thank you.
oleg.feoktistov
Veeam Software
Posts: 1885
Liked: 631 times
Joined: Sep 25, 2019 10:32 am
Full Name: Oleg Feoktistov
Contact:

Re: PowerShell question about Backup location

Post by oleg.feoktistov »

Hi Marco,

We are still working on cmdlets for this case, but there are several options to determine tier locations of storages with unsupported methods. The simplest one being this:

Code: Select all

$backups = Get-VBRBackup -Name 'Backup Name'
foreach ($backup in $backups) {
  $sobr = Get-VBRBackupRepository -ScaleOut | where {$_.Id -eq $backup.RepositoryId}
  $capacity = Get-VBRCapacityExtent -Repository $sobr
  $objects = $backup.GetObjects()
  foreach ($object in $objects) {
   $isCapacityCopied = $false
   $storages = $backup.GetStoragesInCapacityTier($object.Id, $capacity.Id) | select PartialPath, ExternalContentMode
   foreach ($storage in $storages) {
    if ($storage.ExternalContentMode -eq 'Internal') {
     $isCapacityCopied = $true
    } 
    $storage | select PartialPath, ExternalContentMode, @{n='IsCapacityCopied';e={$isCapacityCopied}}
   }

  }
}
It shows you the storages that are only in capacity tier. I'm not sure if this method was available in v11 though, I tested it only on v11a, but worth trying anyway. How to interpret the results:
ExternalContentMode = External, IsCapacityCopied = false - means that the storages you have in the output were offloaded to capacity tier in scope of move policy.
ExternalContentMode = Internal, IsCapacityCopied = true - means that the storages you have in the output were offloaded to capacity tier in scope of copy policy.

In the second scenario, due to architectural peculiarities, you'll have original storages, which reference the corresponding storages copied to capacity tier (not the copied storages themselves).

Let me know if the approach above works in your case.

Best regards,
Oleg
EWMarco
Service Provider
Posts: 39
Liked: 7 times
Joined: Feb 20, 2023 9:28 am
Full Name: Marco Glavas
Contact:

Re: PowerShell question about Backup location

Post by EWMarco »

Thank you Oleg, this is helpful.
mlofrano
Novice
Posts: 5
Liked: never
Joined: Feb 22, 2023 6:07 pm
Full Name: Massimo Lofrano
Contact:

[MERGED] double check Offload with SOBR Repository

Post by mlofrano »

Hi Guys,
does anyone of you found a way to double-check that all the backups have been copied from the performance tier to the capacity tier ?
I can see the icon with a "blue" sign from the GUI, can I have a similar check with Powershell ?

thanks
M.
HannesK
Product Manager
Posts: 14160
Liked: 2807 times
Joined: Sep 01, 2014 11:46 am
Full Name: Hannes Kasparick
Location: Austria
Contact:

Re: PowerShell question about Backup location

Post by HannesK »

Hello,
yes, it's unsupported, but possible. Please see above :-)

Best regards,
Hannes
mlofrano
Novice
Posts: 5
Liked: never
Joined: Feb 22, 2023 6:07 pm
Full Name: Massimo Lofrano
Contact:

Re: PowerShell question about Backup location

Post by mlofrano »

Hi Hannes, thanks a lot for the suggestion, I'll try this solution.
my best.
M.
Post Reply

Who is online

Users browsing this forum: No registered users and 14 guests