Setup an hourly mirrored copy of MDaemon to a local Rsync server...

Expand / Collapse

Setup an hourly mirrored copy of MDaemon to a local Rsync server using BackupAssist

This article explains how to create a mirror of your MDaemon server data using the BackupAssist Rsync Engine. We'll focus on replicating the data locally so that in the event of a server failure, there's a backup ready to start as soon as possible.

Part 1 - Configuring the CWRsync server on the MDaemon backup server

In order to copy the data over to the backup server we must first start by installing the free cwRsyncServer/OpenSSH applications on it.

Create Windows User:

In order to write the files to this server with the correct local permissions we need to create a new local windows user called ‘Backup’. This user must be added to the local 'Administrator' group.

Install cwRsyncServer:

To use Rsync with SSH you will first need to install both SSH and Rsync on your Windows server.

The CWRsyncServer/OpenSSH applications can be downloaded from

Installing cwRsync:

1. Run the cwRsyncServer installer.

2. Continue through the installation wizard, installing the package to any location you choose.

3. During the installation you will be presented with details regarding the SvcCWRSYNC account. We suggest leaving the SvcCWRSYNC account as is.

4. Click 'Install' to install the package. Once this is completed cwRsync should be present on your system.

Installing CopSSH:

1. Run the CopSSH installer.

2. Continue through the installation wizard, installing the package to any location you choose.

3. During the installation you will be presented with details regarding the SvcCOPSSH account. We suggest leaving the SvcCOPSSH account as is.

4. Click 'Install' to complete the process of installing CopSSH on your system.

Later in the installation you will be presented with a popup "At any time after the installation you can access 'Activate a user' from your start menu to allow SSH access to that user. You must activate at least one user before you will be able to register an rsync client". Click 'OK' to continue your installation.

Activating a user with CopSSH:

If you are planning to use SSH, then before you register a BackupAssist client with your Rsync server, you must activate a user with CopSSH.

1. In the start menu, under All Programs -> CopSSH, select '1. CopSSH Control Panel'.

2. To start the process to activate a user, click on the Users tab across the top of the user interface.

3. Click on the 'Add' button to bring up the wizard to activate a user.

Doing so will cause a lock down on the account due to CopSSH’s security settings. We recommend activating a newly created account.

During the 'Activate a User' Wizard:

1. Click 'Forward' on the opening screen.

2. On the second screen, select the Domain and type in the user which you wish to activate (this is the user you created initially in the "Create Windows User" section of this guide).

3. Click Forward once complete.

4. Change the 'Access Type' to Linux Shell and Sftp using the drop down menu. Leave all 'Options' enabled.

5. On the fourth screen, click on 'Apply' to complete the wizard and activate the user.

6. The Rsync Server runs over SSH (TCP Port 22). Make sure this port is allowed in any local firewall including the Microsoft Windows firewall.

Part 2 - Configuring a BackupAssist Rsync Client

In this example we will setup a backup job to mirror the contents of the C:\MDaemon folder to the Rsync Server. Note this path needs to be the same on the Rsync server or you won’t be able to start the MDaemon service.

1. Open BackupAssist and create a new Rsync backup job.

2. Choose standard ‘Rsync’ not ‘s3Rsync’

3. Choose the "Mirror Schedule" and then an appropriate time to update (we will use 22:00).

4. Enter the Rsync Server IP address and details as shown below:

(Note the path is defined as C:\MDaemon)

5. You should click on "Register" and then "test connection" before continuing.

6. Now select all folders within the C:\Mdaemon folder (Note: If MDaemon is running with BlackBerry Enterprise Server we recommend the \MDaemon\BES is excluded as it's not possible to restore this folder natively. This article details how to backup the BES database and the folder the BES database backup is contained in should be included in your selected backup folders instead):

(note do not just select the MDaemon folder or this will create a c:\mdaemon\mdaemon folder on the destination Rsync server.)

7. Name the job "MDaemon Hourly Sync" and choose "Finish".

8. The job details will now be shown,  choose ‘Rsync Options’.

9. Untick the ‘Use full path’ option. This will store the destination files using the full path. As we only want to store the folders not the full path we do not want this option.

This job will now run daily at 22:00. If you wish to run the job every hour you can do this by creating a windows scheduling job to run the BackupAssist job.

Part 3 - Using Windows Scheduler to run a backup job every hour

The first step is to find out the Job ID for the job we wish to run

1. To find the job number press Ctrl + D on the Jobs screen within BackupAssist. You’ll notice a small number appear in the left hand column. This is the Job ID for that job.

2. The next create a Windows schedule event to run this command every hour using the advanced settings.

Note that in order to prevent BackupAssist requesting the date of the RSync job each time it is launched via the scheduled task, the target path in the scheduled task needs to also contain a -u and -d as follows...

"C:\Program Files\BackupAssist v5\BackupAssistManualLauncher.exe" 5 -u -d

In our example the job has id '5'

By starting that job at 8am and running the job every hour for 10 hours the job will run from 8am until 5pm

For more detailed information on setting up scheduled task see.

Part 4 - Making the backup MDaemon server live

Before you can turn the backup copy of the MDaemon folder structure into a functioning live server, you must first run the MDaemon installer and it's plug-ins (Outlook Connector and SecurityPlus) over the top of this folder structure to activate the installation on the backup machine.

For this reason it is a good idea to keep a copy of the installers on the backup server ready to run.