PowerShell script exchange
Post Reply
pizzim13
Enthusiast
Posts: 94
Liked: 6 times
Joined: Apr 21, 2011 7:37 pm
Contact:

Calculating VM backup size with Powershell

Post by pizzim13 »

When adding VM's to a backup job via the gui, Veeam will calculate the approximate disk space used per VM. I will be adding all of my VM's to jobs via a script, but I do not want the total job size to go over a specified limit. Using powershell how can I calculate the ApproxSizeString?
Gostev
Chief Product Officer
Posts: 31806
Liked: 7300 times
Joined: Jan 01, 2006 1:01 am
Location: Baar, Switzerland
Contact:

Re: Calculating VM backup size with Powershell

Post by Gostev »

This should definitely be possible with VMware PowerCLI, just query and sum up VM sizes (nothing to deal with Veeam PowerShell extensions though).

Interesting use case though, gives me something to think about. While I cannot help you creating the script, I would certainly love to learn more on why you want to do something like this.

Can you explain more on how your script will select VMs? Or it will just create multiple jobs from plain list of VMs, creating new job each time when the previous is "full" in terms of total VM size?

Also, what is "a specified limit" and how it was chosen?

Thanks.
pizzim13
Enthusiast
Posts: 94
Liked: 6 times
Joined: Apr 21, 2011 7:37 pm
Contact:

Re: Calculating VM backup size with Powershell

Post by pizzim13 »

You're right. I thought Veeam was coming back with a different number then from vC but I was just looking at two similarly named VM's that have different amount of used storage.

The size of my ESX environment has far outgrown my ability to manage its backup jobs by hand. The script will compare a list of the all the VM's in vC to a list of the VM's currently being backed up by Veeam. All that are not in a backup job will be grouped by OS (to maximize dedupe, there may be other groupings I haven't thought of yet) and put them into jobs of 25 VM's or max job disk size of 2TB. Once either of these limits are reached new backup jobs will be created to accommodate.

Aslo, If a currently backed VM no longer exists in vC it will be excluded/removed from its backup job.

Why those limits:
1) To have the jobs finish with in our backup window.
2) Through trial and error 25 VM's has been an optimal number to process in any one job.
3) I am presenting multiple luns to my backup servers as targets as to not suffer from I/O contention. So I don't want jobs to take more space than I present to them.

The following Using powershell to set VSS creds will be issue with my plans to totally automate this process.
Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests