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 a 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 https://www.backupassist.com/rsync/
Installing cwRsync
- Run the cwRsyncServer installer.
- Continue through the installation wizard, installing the package to any location you choose.
- During the installation you will be presented with details regarding the SvcCWRSYNC account. We suggest leaving the SvcCWRSYNC account as is.
- Click ‘Install’ to install the package. Once this is completed cwRsync should be present on your system.
Installing CopSSH
- Run the CopSSH installer.
- Continue through the installation wizard, installing the package to any location you choose.
- During the installation, you will be presented with details regarding the SvcCOPSSH account. We suggest leaving the SvcCOPSSH account as is.
- 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.
- In the start menu, under All Programs -> CopSSH, select ‘1. CopSSH Control Panel’.
- To start the process to activate a user, click on the Users tab across the top of the user interface.
- Click on the ‘Add’ button to bring up the wizard to activate a user.
DO NOT ACTIVATE YOUR ADMINISTRATOR ACCOUNT
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
- Click ‘Forward’ on the opening screen.
- 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).
- Click Forward once complete.
- Change the ‘Access Type’ to Linux Shell and Sftp using the drop down menu. Leave all ‘Options’ enabled.
- On the fourth screen, click on ‘Apply’ to complete the wizard and activate the user.
- 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 set up 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.
- Open BackupAssist and create a new backup job.
- Choose File Protection
- Select the C:\MDaemon folder
- Choose ‘Rsync’ as the destination
- Choose the “Mirror 1:1 copy” and then an appropriate time to update (we will use 22:00).
- Enter the Rsync Server IP address
- For the Path, choose a folder path on the destination server, for example C:\MDaemon-mirror, This can always be renamed after a final sync to use as a live installation if required.
- You should click on “Register” and then “test connection” before continuing.
- Name the job “MDaemon Hourly Sync” and choose “Finish”.
- The job details will now be shown, choose ‘Rsync Options’.
- 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.
- 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.
- The next create a Windows scheduled 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 a scheduled task see.
http://support.microsoft.com/kb/308569
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 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.