Veeam Agent for Windows 2.0 is today available as a public beta, and it’s soon to be officially released. One of the most awaited features is for sure the possibility to send backups over the Internet to Veeam Cloud Connect, and the feedback we’ve seen during the public beta period has been great so far. There’s actually however one limit in v2: users can only choose one destination for their backups. So, if you want to consume Cloud Connect, this is going to be your only traget and you will have no local backups, and viceversa. Two different policies cannot be configured in the interface, but this doesn’t mean it cannot be done!
Managing Agent configuration from the command line
The configuration of one of my Agent installations is set to run a backup of the entire machine to a local Veeam Backup & Replication repository, scheduled to run daily at 22.00. So, if I run the backup manually or I wait for the schedule to kick in, I can see the activity showing up in the main Veeam Backup & Replication console:
One of the advanced options that Veeam Agent for Windows has is the possibility to manage its configuration via the command line. Once I have configured a backup policy, I can open the shell and export the configuration of the Agent like this:
Veeam.Agent.Configurator.exe -export /f:C:\Veeam\LocalBackupJob.xml
This commands exports the actual configuration into an XML file, for additional external manipulation, or in my case to be then able to switch between multiple configurations. I need now another configuration, this time to consume Veeam Cloud Connect. I open the interface of the Agent, and I complete now the Configure Backup wizard using this option:
I enter the credentials I have to access my Veeam Cloud Connect tenant (or a sub-tenant account if I have one), and complete the wizard, WITHOUT setting any schedule.
I can test the new backup configuration, and this time I will see the backup coming into Veeam Cloud Connect:
Now that I know that also this second configuration is working, I can export it too using this command:
“C:\Program Files\Veeam\EndPoint Backup\Veeam.Agent.Configurator.exe” -export /f:C:\Veeam\VCCBackupJob.xml
Schedule the agent reconfiguration and the double backup
Now, in order to switch between the two configuration automatically, and thus having two copies of my backups created directly by the Agent, I can program a script that runs for example at 3am, so after 5 hours that the local backup is completed, in order to allow the local backup to be completed. The script is going to be a .bat file, and its content will be like this:
“C:\Program Files\Veeam\EndPoint Backup\Veeam.Agent.Configurator.exe” -import /f:C:\Veeam\VCCBackupJob.xml
“C:\Program Files\Veeam\EndPoint Backup\Veeam.EndPoint.Manager.exe” /backup
“C:\Program Files\Veeam\EndPoint Backup\Veeam.Agent.Configurator.exe” -import /f:C:\Veeam\LocalBackupJob.xml
What the script does is it imports the configuration of the backup towards VCC, runs it, and reloads the configuration for local backups, so that on the next day at 22.00 the job towards the local repository will be executed again. Since I have configured the email notifications, each local execution sends me an email right after 22.00:
And another one arrives right after 03.00:
In my case I’m also running my own Veeam Cloud Connect environment, so I can verify that I have effectively a chain stored in my local VBR and also in my remote account in Veeam Cloud Connect.
Restoring data from the two locations
In order to prove that the two chains are both usable as restore options I did this little test. I waited for the local backup to complete at 22.00, and I created a small text file in the machine right after the backup:
After the backup to Cloud Connect has been completed, I deleted the file. So, the file should exist only in my backup stored into Cloud Connect. I tried to run a file restore using one of the set created at 22.00 (the local one) and effectively the file is not there. Actually, not even my new user exists yet in this backup, as you can see here below:
I then changed my restore point, using the restore point made at 03.00 (the remote one) and the file is there indeed, inside my new created profile:
So, if you need to send backups to two different locations, and you don’t want to leverage a Veeam Backup & Replication machine in between, this is another solution that can be applied.