PowerShell helps with Altaro

I really like Altaro VM Backup! It’s so simple, fast and gets the job done. If you haven’t tried it yet, please do – it fulfills the backup needs of small and medium businesses. I’m using it for backup of my Hyper-V virtual machines, of course.

Have I mentioned that they also have the free version, because – they do!

With this little digression out of the way, the thing I want to write now is something that really helped me the other day. I created (yet another) virtual machine on my Hyper-V host and then I tried to add it to backup as well. It is really simple to do this in Altaro – you just select your virtual machine and then drag & drop it to the desired backup location and schedule and that’s it!

As I was connected to my host via Remote Desktop, I was having trouble with drag & drop. I wasn’t able to add my new virtual machine to either backup location or schedule. I’m stuck.

Altaro VM Backup

Altaro VM Backup

So… when all things fail, you’re usually saved by “reading the friendly manual” (RTFM). Or by using PowerShell. I’ve decided to try the latter.

How do you use PowerShell to add the virtual machine to backup when using Altaro VM Backup?

There are a couple of steps, but basically you need to establish the connection to backup server, make Altaro VM Backup aware of your virtual machine, assign it to the desired backup location and schedule. And that’s it! And, even better – the good people at Altaro have written the PowerShell scripts that help you do all that!

The steps are:

  • (inside PowerShell console) go to the C:\Program Files\Altaro\Altaro Backup\Cmdlets where here you can see all the scripts that come out-of-the-box:

Altaro VM Backup

  • all scripts are equipped with help and examples, accessible by adding the –help parameter:

Altaro VM Backup

  • first, we need to establish connection to backup server by using the StartSessionPasswordHidden.ps1 scripts (that will give us connection to the backup server and also Session token (Data field) which we need as first parameter for all the next steps):

Altaro VM Backup

  • next, we need to make Altaro VM Backup aware of our new virtual machine by getting the HypervisorVirtualMachineUuid of this virtual machine with GetVirtualMachines.ps1 script:

Altaro VM Backup

  • then we can add this virtual machine to Altaro with AddVirtualMachineToConfig.ps1 script by passing the Data (actually the VirtualMachineRefId) value from the previous step:

Altaro VM Backup

  • next, we need to check our available backup locations with GetBackupLocations.ps1 script:

Altaro VM Backup

  • by using the AddVirtualMachineToBackupLocation.ps1 with BackupLocationId from the previous step, we will assign our virtual machine to desired backup location:

Altaro VM Backup

  • next, we need to add this virtual machine to a desired schedule as well – with GetSchedules.ps1 script, we can get the ScheduleId:

Altaro VM Backup

  • and with this parameter in hand, we can start the AddVirtualMachineToSchedule.ps1 script:

Altaro VM Backup

  • last, but not least, we need to close all sessions by using the EndAllSessions.ps1 script:

Altaro VM Backup

  • finally, we can see the results in the GUI (our machine should be added to the backup location and schedule – everything that’s needed to start backing it up!):

Altaro VM BackupAltaro VM Backup

Pretty simple (and cool), right?! Hope it helps!

Cheers!

Altaro Hyper-V Backup v5 just released

New version of my favorite Hyper-V backup tool just got officially released! Smile

Altaro released the long-awaited next version of their Hyper-V backup software, Altaro Hyper-V Backup v5 – it features a completely new look, centralized configuration and management of multiple hosts with greater flexibility and improved performance. Do I have to mention that it has a free version as well? Smile

FREE version offers free backup of two virtual machines… forever! (there is also a 30-day trial available for more than two virtual machines)

I like it because it’s simple and not too expensive (in more than one aspect), fast, does the job, and does it pretty good! I’ve also installed the new version on one of my hosts, and it looks just great (can’t wait to run the first backup and restore of my virtual machines)!

Altaro Hyper-V Backup v5

 Altaro Hyper-V Backup v5

You can find more info and official announcement here.
Download is available here.

Cheers!

UPDATE: Please, don’t remove your own host from the console (until the next week’s release goes public) – in the current public release (5.0.75.0), you won’t be able to add it back!

Workaround:
1. stop all Altaro services
2. go to %ProgramData%\Altaro
3. rename the AltaroBackupProfile folder to AltaroBackupProfile.old
4. start all Altaro services