PowerShell script exchange
Post Reply
arosas
Enthusiast
Posts: 44
Liked: 6 times
Joined: Jun 09, 2015 9:33 pm
Full Name: Tony Rosas
Contact:

File list from all repositories

Post by arosas »

Is there a way to get a file list of all files within all repositories, regardless of associated jobs?
All repositories have sub folders.

Using the Get-VBRBackupRepository | fl only returns the repository and path but not the files.

For example:
REPOSITORY1>Home>Veeambackup>FileServer>FILESERVER1_Copy_Old
FILESERVER1_Copy2015-11-17T220000.vbk 12.7TB 11/25/2015 9:51:26 AM
FILESERVER1_Copy2015-08-22T220000.vbk 12.1TB 11/25/2015 10:30:59 AM

If it makes a difference the repositories are Exagrid dedupe appliances.

veremin
Product Manager
Posts: 17994
Liked: 1711 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: File list from all repositories

Post by veremin »

Check this example and see whether it's something you're after:

Code: Select all

Asnp VeeamPSSNapin
$Repository = Get-VBRBackupRepository -Name "Name of your Backup Repository"
$Job = Get-VBRJob | where {$_.info.TargetRepositoryId -eq $Repository.id}
(Get-VBRBackup -name $Job.name).GetAllStorages() | select {$_.PartialPath}
Thanks!

arosas
Enthusiast
Posts: 44
Liked: 6 times
Joined: Jun 09, 2015 9:33 pm
Full Name: Tony Rosas
Contact:

Re: File list from all repositories

Post by arosas »

Thank you for the information, this gets me going in the right direction.
Very much appreciated.

veremin
Product Manager
Posts: 17994
Liked: 1711 times
Joined: Oct 26, 2012 3:28 pm
Full Name: Vladimir Eremin
Contact:

Re: File list from all repositories

Post by veremin »

Sure, the provide example can be expanded further in many different ways. Say, you want to get sizes of those backups, then, you will create something like:

Code: Select all

Asnp VeeamPSSnapin
Get-VBRBackup | Select @{N="Job Name";E={$_.Name}}, @{N="Size (GB)";E={[math]::Round(($_.GetAllStorages().Stats.BackupSize | Measure-Object -Sum).Sum/1GB,1)}} | Format-Table -AutoSize
Thanks!

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests