Send Veeam Agent for Windows backups to both a local repository and to Cloud Connect

0 Flares Twitter 0 Facebook 0 LinkedIn 0 Email -- 0 Flares ×

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:

@echo off
“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.

9 thoughts on “Send Veeam Agent for Windows backups to both a local repository and to Cloud Connect

  1. Surely a copy job resolves the need to perfrom this action?

    • Indeed, but since backup copy will not be available in v2, I’m suggesting this workaround. Unless you want to send backup first to a VBR machine, and then do backup copies from there.

      • Is it possible to also change the emailsubject so the customer can see which job has been running?

        • Hi Frank, not at this time. Job name contains computer name. Email report subject has %ComputerName% variable only.

  2. Trying this for a client, but stuck on the batch file. using the VAW 2.0 RTM client. Keep getting the following error during the import of the VCCBackupJob XML:
    Failed to perform the operation.
    Value cannot be null.
    Parameter name: creds
    ExitCode: 0

    Seems it requires credentials in order to perform the import. Can you advise on the syntax for this?

  3. So using the handy dandy /? switch. I was able to find the necessary syntax for the credentials. great, the VCCBackupJob profile loads! The backup runs and the original profile reloads.

    So Far so good.

    A check of the cloud connect server shows a “success” status for the backup; however data sent and received both show “0” bytes. Reloading the VCCBackupJob profile and then open the Veeam Agent Control Panel … Hum … job shows failed. Reason is “Unable to allocate processing resources. Error: Authentication failed!”.

    Double check and triple check the username and password used for the Cloud connect job … all is good. Even tried running the job thru the Veeam Agent Control, Panel, thinking maybe command line is still missing something … it fails as well.


    • The two times I created this lab, I had both times no issues like yours. I suggest you write in the Veeam forums so Veeam developers can help you.

      • Hi Luca,
        I did not get the option to choose the VCC repository. the version is Is this limited to Licensed versions only; the only options I have are
        local storage
        shared folder
        Veeam backup repository

Comments are closed.