Getting Started with Altaro VM Backup and PowerShell.
Altaro VM Backup is an easy to use backup software solution for VMware. It’s built to back up and restore virtual machines.
The Backup and Recovery process eliminate’s hassle and headaches with an easy-to-use interface, straightforward setup and a backup solution that gets the job done every time.
Altaro VM Backup is reliable, intuitive and feature-rich, plus you get outstanding support as part of the package.
In this blogpost we will look at how to automate the backup and recovery of your virtual machines with Altaro VM Backup.
Click on this link to learn about some main features which come with Altaro VM Backup
The Windows Service which enables API calls is disabled by default and it must be enabled manually before the API can be used.
We need to set the start up type for the Service as Automatic before starting it, it can be easily done using powershell by executing the below commands, which will set up the start-up type to automatic and also start the service.
A valid session must be opened in order to use the API. This ensures that the user is properly authenticated. If an API call is requested without a session, or with an invalid session, the call is ignored and an error message is shown to the user.
To open an API session, the following POST request should be used:
This call requires the following parameters:
- ServerPort: The port being used by the Altaro Agent. This can be left out if the default 35107 port is being used.
- Username: A username which has access to the machine where Altaro VM Backup is running.
- Password: The password of the above username.
- Domain: The domain of the above username.
Now we can make this POST request using Altaro PowerShell cmdlets which come bundles as scripts.
These are StartSessionPasswordHidden.ps1 and StartSessionPasswordShown.ps1.
The main difference between these two is that the former prompts the user for the password, while the latter accepts the password as an argument.
This means that the former is more secure, but the latter can be easily automated. As it has been mentioned previously, usages for these cmdlets can be accessed using the –help suffix.
When the credentials are valid and the call is successful, the response will contain a Session Token. The Session Token is a GUID and must then be used in all the subsequent API calls.
This way, there is no need to enter the credentials for every API call; the Session Token is quoted instead, which is much easier.
Next lets explore the powershell scripts which come bundled with Altaro.
Change your Present working directory to Altaro Cmdlets and retrieve the scripts available.
Next, lets establish a connection to the Altaro VM Backup API service, this can be done using the StartSession cmdlets.
Lets explore the help for these cmdlets, this can be done by appending –help to the cmdlet.
Lets use the above syntax and connect to the API service.
As you can see we successfully connected to the API services.
In the next set of blogs we will explore how to use the other set of scripts available to automate vm backups and other backup related configuration tasks.
Enjoy! using altaro and powershell to automate virtual machine backups 🙂