Call: +1 972 342 1432
Name *
Phone No. *
Security Code *
Name *
Email *
Question *
Security Code *

Get more from your data

Scalability Experts Blog

Configure Month End Backups using Veeam Backup & Replication


I was faced with the task of configuring monthly backups with Veeam Backup & Replication.  More specifically, configuring month-end backups to take place on the 1st of every month.  The backups needed to be Active Full, not increments.

If we take a closer look at the advanced options within a Veeam backup job, you'll notice that we only have the ability to schedule the backup job to perform an Active Full backup on a specific day of the month - such as Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, or Sunday.


The issue with this type of scheduling, is that the 1st of the month doesn't always land on a Monday, for instance.  I had initially scheduled this job to take place on the 1st Monday of the month.  Upon reviewing the calendar, I soon came to realize that when this job runs, there would be an instance where the 1st Monday of the month could land on the 2nd, or the 7th for instance - thus preventing the backup job from performing an Active Full.  It would have resulted in an incremental.

The customer specifically said a full backup needed to take place on the 1st of the month, regardless of the day of the week.  How did I accomplish this task?  I tried to keep it as simple as possible.

There is a script available which includes error reporting at the Powershell prompt, however Veeam does a great job of informing us that a job failed.  Also, this would have to be accomplished using the Windows Task Scheduler.

The first step was to install the Veeam Powershell snapin.  If this wasn't installed during the initial Veeam Backup & Replication installation, you'll need to go back and install this option using the Veeam installer.

After installing the Veeam Powershell snapin, I attempted to load the Veeam snapin to confirm this functionality was working:

PS C:\> Add-PSSnapin VeeamPSSnapIn

This presented me with an error, stating that the snapin could not be loaded.

I was faced with another issue - Powershell 2.0 is installed on this Windows Server 2008 R2 machine, however the Veeam snapin requires Powershell 3.0.  I found that running the following script would prevent me from spending extra time uninstalling Powershell, and re-installing Powershell 3.0.

I opened a Powershell administrative command prompt, and changed to the following directory:

C:\Program Files\Veeam\Backup and Replication

Following this, I ran this command to invoke the installer for the Veeam PS Toolkit, which resulted in success confirming that commands were now available.

PS C:\> .\Install-VeeamToolkit.ps1

That was a relief - I saved loads of time running that script which initializes and registers the correct DLL's for Powershell to talk to the Veeam PS API.

Now, to test the snapin and its communication with the Veeam engine.  I ran the following command to confirm the backup job I wanted to run which is called "Monthly Backup - ACCOUNTING"

Get-VBRJob | where{$_.Name -eq "Monthly Backup - ACCOUNTING"}

This resulted in success:


The next step in the development of this task was to set the advanced options in the backup job - I needed a way to perform an Active Full backup, regardless of the day of the week.  The workaround for this was to set the Active Full backup to take place weekly, every day of the week.  If this was set to the Monthly option, it would have taken an Active Full backup if we happened to land on the first Monday, for instance.  This would have resulted in an incremental taking place.


I also needed to make sure that there wasn't a schedule configured for the backup job.

Through the magic of Windows Task Scheduler, I was ready to schedule triggering the Powershell script to run the 1st of every month.  I created a .ps1 file named "VeeamMonthEnd-ACCOUNTING.ps1" and placed it in an administrative folder on the C drive.  The contents of this simple script are as follows:

Get-VBRJob | where{$_.Name -eq "Monthly Backup - ACCOUNTING"} | Start-VBRJob

Let's begin by creating the scheduled task in Windows.  A name and description is essential for documentation and management purposes:


Now we need to tell the task that we want this script to run Monthly:


I chose to start this task at 6:30pm, on the 1st of every month.  Select all of the months, and enter in the 1st as the date to trigger this task:


The next step defines the action - I chose to run this from a Powershell prompt, triggering our simple script to start the Veeam backup job.  The full command is:

powershell -file "C:\Administration\Environment\Scripts\VeeamMonthEnd-ACCOUNTING.ps1"


After clicking next, you may notice an alert that you're adding an argument - just ignore this.

Last but not least, our summary screen.  Time to configure some security options - we want this job to run as an administrative user that has access to the Veeam PS Snapin.  In this case, I ran this as the domain user, DOMAIN\veeam.  We also need this job to run with the highest privileges, whether the user is logged in or not:


There we have it - a simple way to trigger a Veeam backup job to run the 1st of every month, regardless of the day of the week.  In combination with the Windows Task Scheduler, Powershell, the Veeam Powershell API, and a little scripting, I was able to provide the customer with Active Full, month end backups.

Feel free to leave any questions you may have below and I will do my best to answer them.


comments powered by Disqus