Need a script to find change data per harddisk

PowerShell script exchange

Need a script to find change data per harddisk

Veeam Logoby Shaft » Wed Aug 05, 2015 1:13 pm

I am looking for a script to tell me how many Harddisks I a backing up and how much change data they are backing up for each job. I am not very good at scripting but I have made a few. This one however is stumping me...


Any assistance with this would be greatly appreciated.
Shaft
Influencer
 
Posts: 10
Liked: never
Joined: Tue Nov 05, 2013 3:06 pm
Full Name: Vince Rucolas

Re: Need a script to find change data per harddisk

Veeam Logoby Shestakov » Wed Aug 05, 2015 4:39 pm

Vince,
Here is a topic describing how to list disks in the backup. And Veeam One VM Change Rate History report which shows historical information on VMs disks change rate.
Thanks!
Shestakov
Veeam Software
 
Posts: 4863
Liked: 396 times
Joined: Wed May 21, 2014 11:03 am
Location: Saint Petersburg
Full Name: Nikita Shestakov

Re: Need a script to find change data per harddisk

Veeam Logoby PTide » Wed Aug 05, 2015 5:23 pm

Hi,

Here is how you can get info about what disks are in the restore point (names and identifiers has been changed for security reasons). In a listing below you can find .vmdk names. The example given in this thread provides you with info which SCSI nodes are included in the backup whereas the listing below shows you which .vmdk are present in the RP. By default all nodes are included (empty too).

Code: Select all
PS C:\Users\PTide> $restore = Get-VBRRestorePoint -Name NAME
PS C:\Users\PTide> $restore.Info


Id                : 51344782-844c-4e8e-84c4-8ccf4d5175a2
OriginalOibId     : 51344782-844c-4e8e-84c4-8ccf4d5175a2
ObjectId          : fc4f6935-8779-4215-87e7-80af5c5a2e14
PointId           : 08697765-890a-4505-82fc-522a6155a426
StorageId         : 222658bc-7eed-48fa-af76-9cedfb9360ed
LinkId            : 00000000-0000-0000-0000-000000000000
IsCorrupted       : False
IsConsistent      : True
State             : Nothing
Type              : Full
Algorithm         : Full
InsideDir         : 1b74d34d-ec31-4ce3-bbe8-44a90cd92e22 (vm-1107)
CreationTime      : 7/30/2015 1:59:54 PM
VmName            : NAME
ApproxSize        : 42950721536
GuestInfo         : Veeam.Backup.Model.CGuestInfo
EffectiveMemoryMb : 4096
HasIndex          : False
HasExchange       : False
HasSharePoint     : False
HasSql            : False
HasAd             : False
AuxData           : <COibAuxData><CreationUsn value="625712" /><HasVssMetadata>False</HasVssMetadata><COibAuxDataVmware
                    ><VmMoRef>vm-1107</VmMoRef><HostName>HOSTNAME</HostName><EsxName>ESXNAME</EsxName><DataStoreRef>datastore-88</DataStoreRef><ResourcePoolRef>resgroup-200</ResourcePool
                    Ref><FolderRef>group-v3</FolderRef><SnapshotRef>snapshot-1169</SnapshotRef><SnapshotCreationTime>52
                    47424526180672064</SnapshotCreationTime><DirPath>[zLocal] NAME</DirPath><Location>HOSTNAME</Location><OijId>b742e1ce-0d99-4971-bd75-39ad7ca3ce1f</OijId><RealVmSize>
                    42951956189</RealVmSize><VmxFileDatastorePath>NAME/NAME.vmx</VmxFileDatastorePath><
                    Profiles><ProfilesInfo /><VmAndDisksProfilesIds /></Profiles><NicInfo Nic="0" ConnectAtPowerOn="Tru
                    e"><Network><Name>B_net</Name></Network></NicInfo><NicInfo Nic="1" ConnectAtPowerOn="False"><Networ
                    k><Name>VM Network</Name></Network></NicInfo><Disk><Key>2000</Key><ControllerKey>1000</ControllerKe
                    y><DescFileName>NAME.vmdk</DescFileName><FlatFileName>NAME-flat.vmdk</FlatFileName>
                    <ChangeId>52 32 8e 30 d5 c8 41 0c-08 8f 8f f6 05 48 03 87/20</ChangeId><SnapshotRef /><DatastoreRef
                    >datastore-88</DatastoreRef><Path>NAME/NAME.vmdk</Path><BusType>2000</BusT
                    ype><Label>Hard disk 1</Label><Capacity>42949672960</Capacity><ThinProvisioned>False</ThinProvision
                    ed><ExistsInBackup>True</ExistsInBackup><ContentId>00e392d13a46bc8b45ae45c1d12a20fe</ContentId><Mod
                    e /><TaskId /><DiskId>ae543585-e717-4a86-8d9a-3945f4375e6f:fc4f6935-8779-4215-87e7-80af5c5a2e14:200
                    0:51344782-844c-4e8e-84c4-8ccf4d5175a2</DiskId><State>Processed</State><ValidProcessedOffset>429496
                    72960</ValidProcessedOffset></Disk><VmStateInStorageSnapshot>0</VmStateInStorageSnapshot><VmxDatast
                    oreUuid>51c8368e-44515f1f-6d07-001517de5110</VmxDatastoreUuid><VmxDiskPaths /></COibAuxDataVmware><
                    /COibAuxData>
ParentId          : 00000000-0000-0000-0000-000000000000
DisplayName       : NAME
Fqdn              :


Please let us know if you need extra info on that.

Thank you.
PTide
Veeam Software
 
Posts: 3022
Liked: 247 times
Joined: Tue May 19, 2015 1:46 pm

Re: Need a script to find change data per harddisk

Veeam Logoby PTide » Thu Aug 06, 2015 9:26 am

BTW, what are you trying to accomplish with such script?
PTide
Veeam Software
 
Posts: 3022
Liked: 247 times
Joined: Tue May 19, 2015 1:46 pm

Re: Need a script to find change data per harddisk

Veeam Logoby PTide » Thu Aug 06, 2015 1:45 pm

how much change data they are backing up for each job

Not sure whether you need "per disc" value or total, but I can give you an example of how to obtain the latter:

Assume you have a job named "script":

Code: Select all
$allSessions = Get-VBRBackupSession
$getOne = $allSessions | ? {$_.JobName -eq "script"}
$transfer = $null
$getOne | %{$transfer += $([Math]::Round([Decimal]$_.Progress.TransferedSize/1GB, 2))}
echo $transfer


The output will show you the total amount transferred for the "script" job in GB, two decimal places.
PTide
Veeam Software
 
Posts: 3022
Liked: 247 times
Joined: Tue May 19, 2015 1:46 pm


Return to PowerShell



Who is online

Users browsing this forum: robbysmith and 8 guests