Since the name of your Object Storage bucket does not have to be the same as the real bucket name in Wasabi, how do you retrieve the (real) bucket name with powershell?
Easiest would probably to get it from the path as shown in the GUI under Backup Infrastructure -> Object Storage and than use something like .Split("/")[3]
I haven't found a way yet, either for the bucket name or the path, am I missing something?
-
- Service Provider
- Posts: 105
- Liked: 7 times
- Joined: Aug 24, 2010 8:55 am
- Full Name: Alex
- Contact:
-
- Product Manager
- Posts: 10309
- Liked: 2752 times
- Joined: May 13, 2017 4:51 pm
- Full Name: Fabian K.
- Location: Switzerland
- Contact:
Re: retrieve the (real) bucket name with powershell
Hi Alex
I checked in my lab and splitting the path seems the only way to do it. Code doesn't look pretty, but works.

Best,
Fabian
I checked in my lab and splitting the path seems the only way to do it. Code doesn't look pretty, but works.
Code: Select all
Get-VBORepository | Where-Object { $_.ObjectStorageRepository -ne $NULL} | Select-Object name,@{Name="bucketname";Expression={$_.Path.split("(")[1].split("\")[0]}},@{Name="foldername";Expression={$_.Path.split("\")[1].split(")")[0]}} | Sort-Object bucketname

Best,
Fabian
Product Management Analyst @ Veeam Software
-
- Service Provider
- Posts: 105
- Liked: 7 times
- Joined: Aug 24, 2010 8:55 am
- Full Name: Alex
- Contact:
Re: retrieve the (real) bucket name with powershell
I was happy for a short time
The path property of Get-VBORepository is the path to the local persistant cache, I need the path to object storage.
So not F:\ObjectRepo01 but something like amazonS3://s3.nl-1.wasabisys.com/01testbucket/Veeam/Backup365/backups where 01testbucket is the (real) bucket name and backups is the folder name.

So not F:\ObjectRepo01 but something like amazonS3://s3.nl-1.wasabisys.com/01testbucket/Veeam/Backup365/backups where 01testbucket is the (real) bucket name and backups is the folder name.
-
- Product Manager
- Posts: 10309
- Liked: 2752 times
- Joined: May 13, 2017 4:51 pm
- Full Name: Fabian K.
- Location: Switzerland
- Contact:
Re: retrieve the (real) bucket name with powershell
Hi Alex
I run my script on version 8. Here it works with the path property.
I assume you are still using version 7? Version 8 does not have the local persistent cache as jet databases anymore.
Best,
Fabian
I run my script on version 8. Here it works with the path property.
I assume you are still using version 7? Version 8 does not have the local persistent cache as jet databases anymore.
Best,
Fabian
Product Management Analyst @ Veeam Software
-
- Service Provider
- Posts: 105
- Liked: 7 times
- Joined: Aug 24, 2010 8:55 am
- Full Name: Alex
- Contact:
Re: retrieve the (real) bucket name with powershell
yeah, v7, and considering the size of our installations we'll probably not be upgrading for a few months
Who is online
Users browsing this forum: No registered users and 64 guests