Dell AppAssure – Synchronous Backup through PowerShell

Almost a year ago I was asked to write a little script.
This customer had chosen Dell AppAssure as their backup solution.
Note that I’m not bashing the product since I think it’s a solid solution.
However… as always a sales guy sold the product to a customer telling them ‘Yes, we can!’ when instead he should have said ‘No, we can not!’.
In the first place I want to thank this sales guy because he has brought me some new customers… 🙂
So, the customer was expecting AppAssure to be able to perform synchronous backups of i.e. a database- and file server.
But AppAssure is built for scheduled continuous backups!
You define that a server needs to get a backup ever X hours. When this time is passed, it will start a new backup.

So when the schedule is every 2 hours and the database server finished before that but the file server doesn’t, the database server will begin a new backup while the file server is still performing the previous backup task… and there we have the inconsistency.

So, this customer asked me to solve this.
I don’t think it needed to be solved since AppAssure simply has a different backup philosophy…
But I found it to be challenging nevertheless so here’s my solution (Dell AppAssure.ps1) :

So how does it work?

The files for the scripted AppAssure synchronous backup are located on the AppAssure management server at ‘C:\AppAssure’.

The script
The script is located in ‘C:\AppAssure’ on the AppAssure server and is named ‘AppAssure_SynchronousBackup.ps1’. This script takes a CSV name as a parameter when executed through the Windows Task Scheduler.

The content (CSV)
For each group a backup schedule is decided. For each backup schedule there is a separate CSV file named ‘Group.csv’. These CSV files have headers named ‘Target’
Each row in such a file is considered a group of server that need their backup to be in sync. There is a maximum of 5 servers per group:

Task Scheduler
The Windows task scheduler is used to execute the backup jobs according to a defined schedule.
This schedule is configured in the task, not in the script.

Event log
The script writes output to the Application event log in Windows.

The source for the events is ‘AppAssureScript’ where the EventID ‘33182’ means the backup job has succeeded and Event ID ‘33183’ means the backup job has failed.
The name of the server is shown in the message of the event:

Howto add a new group of server to an existing backup job
Edit the appropriate CSV file and add a new group of servers.

Howto create a new backup job
1)      Create a new CSV file the the headers as shown in the following example:
2)      Create a new Scheduled Task with the following content:
The arguments are ‘-ExecutionPolicy bypass -command C:\AppAssure\AppAssure_SynchronousBackup.ps1 -CSV C:\AppAssure\group1.csv ‘ without the quotes and with the appropriate CSV file.
3)      Configure the desired schedule for the backup task to run by defining a trigger:

The finishing touch
1)      Define and configure the backup schedules (Window Task Scheduler)
2)      Enter the desired groups of servers in the appropriate CSV files.
3)      Configure the internal monitoring tool to monitor failed backup jobs by using the events written to the event log by the script.

Leave a Reply

Your email address will not be published. Required fields are marked *