Archive by category "Backup and Replication"

Veeam backup copy to multiple offline external disks

Wondering how to create an offline disk back-up copy with more than one USB Disk? And not want to spend your IT budget on “Veeam cloud connect” This is originally not possible with the Veeam GUI because you can’t map 1 backup copy job against 2 USB disks. The job will fail because Veeam cant find one incremental which one is copied on the second USB disk which is on a safe place @home. I made a script for enabling and disabling the right copy job for each mapped USB disk.


VEEAM Task failed Error: Exception of type ‘System.OutOfMemoryException’ was thrown

Last week I had the following error when starting a Veeam backup job. I thought my proxy servers where out of memory, so I rebooted them. Then I started the backup jobs again, with no result.

To solve this issue you must logoff all the other RDP sessions, which have a disconnected session with the Veeam console open. Alternatively, give the Veeam backup server more resources so there is more memory available.

Exchange backup VEEAM

Veeam Backup and Replication gives the possibility to create a consistent backup from your Exchange farm. This can be a standalone Exchange system or an Exchange DAG cluster. It makes use of the Microsoft Exchange VSS writers inside the VM. The Veeam server creates a RPC connection to the Exchange servers, and place some backup scripts on the /ADMIN$ share. When the backup starts Veeam starts this script which talks to the Microsoft VSS Writers to create a consistent backup.

Enable application aware processing

To create an application aware backup in Veeam you must enable the “Application aware processing” option in the Veeam job properties. Then go to applications for application specific settings. In this tab you can configure VSS, Log and error settings. Configure settings which are suitable for your systems.

User rights Veeam Exchange backup

Select credentials which have full rights (read / write) to all files in the folder with the database.
For direct restore to your exchange farm the user must also have full access to the Mailbox. This user permissions can be set with the following command:

When you have a service account for restoring to all mailboxes you can use Exchange impersonation. This can be set with the following command:


Back-up Exchange DAG Cluster

When you create a backup of an Exchange DAG Cluster node, default all active and passive nodes are available for restore. So theoretically you only have one backup of 1 exchange node.

Tips for creating backup of your Exchange DAG Cluster:

  • Backup both of your exchange servers in one backup job, this gives you better dedup results.
  • Don’t backup your exchange nodes in separate jobs at the same time, this can cause a failover.
  • Veeam backup can cause load on your exchange server, the best situation is to create a new exchange cluster node server with only passive mailboxes.
  • When your exchange servers failover during a backup you can increase the failover time of your exchange cluster nodes. Commands for changing the cluster parameters:




Veeam Backup free

Veeam delivers powerful backup software for backup your virtual or psychical servers (veeam endpoint). The backup method for VMWare or Hyper-V virtual systems is agentless. There is no need to install something on the guest system. Veeam Connects to the Hypervisor layer, creates a snapshot, transports this snapshot to a backup repository and saves it. Veeam make use of the Hypervisor API to create a backup. When there is some application installed on the system there is a possibility to create a what they called application aware backup. The Veeam service connects with RPC to the virtual system and make use of the application VSS writers to create a consistent backup.

VEEAM Backup free features:

Veeam Free make use of the VeeamZIP to create ad hoc backups of the virtual machine for operational, portability or archival purposes.

Following features are enabled in the free edition:veeam_endpoint_backup

Backup & Restore: Full back up creation and restore.
VM File recovery: The possibility to restore VM files (vmdk, vmx for example).
Veeam Explorer: Restore AD, SQL, Exchange or Sharepoint objects.
Native tape support: copying files to tape drives.
Backup encryption: Allows you to encrypt the backup files.

Veeam Backup psychical server, client or desktop

Veeam endpoint protection allows you to make use of a stand-alone Windows service for backup of your physical client or server. It does not require a dedicated server or repository’s. You just install the software on each server you want to protect. The windows server makes use of a little local MS SQL DB. It is possible to integrate Veeam endpoint with Veeam Backup and Replication software. This allows you to save your endpoint backup on a Veeam repository.
Note: Veeam Endpoint does not support Application VSS writers yet. So the backup is not Application consistent. But for many situations is a crash consistent enough.

Features Veeam endpoint backup:

Backup & Recovery: Choose to back up your entire computer, volume or just a couple of maps.
Scheduler: When do you want that the backup task runs?
Backup target: Where do you want to place the created backup? When you choose a removable device (USB stick) you can choose to detach the device when ready. This protect the device from ransomware.
Bitlocker: Veeam endpoint supports bitlocker encrypted drives.
Create recovery media: In case of a full system crash you can use your created recovery boot USB stick.
Support: Veeam gives free support, because they want to be the best. Yes this is awesome 

Veeam download

Click here

Access to the registry key ‘HKEY_LOCAL_MACHINE\SOFTWARE\Veeam\Veeam Backup and Replication’ is denied.

There are two ways to solve this:

1. Run VEEAM PowerShell always as Administrator
2. Change the permissions of the following registry key: \\HKEY_LOCAL_MACHINE\SOFTWARE\Veeam\Veeam Backup and Replication\ -> Users full control.

PowerShell Rest API programming

With the PowerShell invoke-restmethod command it’s possible to interact with a REST based API.
In the following script I’ve added a couple of examples how-to interact with methods as GET and POST.

Add VM to VEEAM Portal scope with PowerShell and the VEEAM Rest API

The steps taken in this script:
– Creating a new session with the given credentials.
– Search for the VMid (GET query).
– Search for the right account. (GET query)
– Add VM To portal scope (POST with XML body).

*note: No error/exception handling added, just a beginners script to show howto interact with the VEEAM Rest API with PowerShell.


Add VM to VEEAM Backup job using PowerShell

I created a simple PowerShell function to add VM’s in a VEEAM backup job. This script has 2 options, enable indexing  and/or application aware processing per object.

There are many more possibilities to add functionality. For now, it fits our needs. If you have some feature requests, please comment below.

It can be used by VMWare and Hyper-v users; it checks the hypervisor in the beginning.
Run this script on a VEEAM VBR Server.

Together we can improve this PowerShell function, don’t hesitate to comment.
Deleted some bugs 23-01-2017


Veeam exclude disks using PowerShell

When you have multiple jobs with many VMs it’s a boring task to change all the disk exclusions by hand. That’s why VEEAM have made a nice PowerShell module to automate this boring tasks.

Excluded disks are displayed with numbers, the numbers in Hyper-V are different (because of the IDE disks) then how the numbers are showed in VMWare.

Since Veeam 9.5 Update 4 the diskfilter mechanism in Veeam is changed.

Now we can report both.. SCSI Controller id and the Keynumber as we known earlier.
This means the PowerShell CMDLets also Changed.

Report diskfilter:

Change diskfilter:

Change diskfilter before 9.5 Update 4

See the current excluded disks and the numbers with this script (Run as Administrator):

Change the disks exclusions with PowerShell (Run as Administrator):

Comments are welcome.

Task failed. Failed to expand object. Error: Object was not found

Task failed. Failed to expand object. Error: Object was not found

Change VM ID VEEAM database.
In my case I had to replace the old VM id with the new one.

There are multiple reasons why the VMID is changed. This can be caused by exporting and importing the VM for example. When this situation occurred you get the following error in VEEAM:
“Task failed. Failed to expand object. Error: Object was not found”

If you don’t want to add the new object and creating a new full back-up of the VM. You can change the VM ID in the database.

When this is done the forward incremental runs as before.

First we need to determine the OLD id where VEEAM is looking for.
This can be done with the following lines SQL Query against your VEEAM DB:

Get old object ID before Veeam version 9.5

Get old object ID Veeam 9.5

The following step is to get the new VMID from Hyper-V or VMWare.
With Hyper-V Virtual Machines Manager (SCVMM) PowerShell Module.

Run PowerShell as Administrator:

With VMWare can this be done with PowerCLI on the ESX host.
Excuse me when I’m wrong, but I think:

SQL Query:

Put the new ID by SET.
Put the old ID by WHERE.

*Tested with VEEAM Backup & Replication 8

CSV IO Paused during Back-up

Finally there are hotfixes for the annoying CSV IO Paused during the back-up. The issue mostly occurs when multiple CSV VSS Snapshots are initiated. I’ve tested the hotfixes in my test envoirement and the issues seems to be gone now.

The components:

Component: Clussvc.exe
Resolves an issue when multiple VSS backups are in progress, the cluster service may crash because of inconsistent state in the CSV VSS provider.

Component: Volsnap.sys
Resolves an issue where unneeded snapshots may not be deleted after a backup is completed. This prevents future backups from failing due to a lack of free space consumed by snapshots.

Component: Hyper-v Integration Services
Increases the time-out to detect the volumes to shadow copy when the Guest OS has multiple volumes.

Component: Rdvgpuinfo.dll / Vmms.exe
Resolves an issue on a Hyper-V cluster where the heartbeat component times out during a long-running snapshot. The snapshot fails and the VM restarts.

The full list of Microsoft Cluster Hotfixes: