Regularly Back Up SmarterMail Using RoboCopy

This article applies to recent versions of SmarterMail. View articles for SmarterMail 15.x and earlier.

Regularly backing up your email files is a good practice to keep as it helps prevent the loss of important data in the event of a hardware crash, hard drive corruption, system failures, etc. If you do not have a professional backup solution in place, you can set up a scheduled task in Windows to fully back up the SmarterMail installation on a regular basis. The backup can be stored on a separate hard drive or a dedicated folder of an existing drive. RoboCopy is a command-line directory replication command used as a backup solution for smaller companies. NOTE: The source folders are mirrored with the destination folders, so any folders or files that exist in the destination but no longer exist in the source will be removed. As a result, you must use an empty directory to store the backup, as all existing files in the destination directory will be deleted.

This solution has been tested on Windows Server 2000, Windows Server 2003 and Windows XP. It should also work on Windows 7 or Windows Server 2008.

Follow these steps to configure Windows to regularly back up SmarterMail:

  1. Download the Windows Resource Kit Tools package and install it. The package can be downloaded from http://www.microsoft.com/downloads/details.aspx?familyid=9d467a69-57ff-4ae7-96ee-b18c4790cffd&displaylang=en.
    (The resource kit does not support 64-bit systems).
  2. Create a batch file in C:\ called backupsmartermail.bat.
  3. Edit it with notepad and enter the following, replacing DEST:\FOLDER\ with the destination drive and folder of the backup:
@echo off
C:
cd "C:\Program Files\Windows Resource Kits\Tools\"
md "DEST:\FOLDER"
md "DEST:\FOLDER\service"
md "DEST:\FOLDER\mail"
echo Backing up config files...
robocopy "C:\program files\smartertools\smartermail\service" "DEST:\FOLDER\service" *.xml /ZB
echo Backing up mailboxes...
robocopy "C:\SmarterMail" "DEST:\FOLDER\mail" /MIR /R:6 /W:10 /ZB

4. Save the file.
5. Add a scheduled task to Windows to execute the .bat file on a regular basis.

NOTE: Professional backup solutions will typically be more resilient to failures and file locking, but for those without the budget to buy one of those solutions, this is better than doing no backups at all. Use of this method of backup is not supported by SmarterTools. Please exercise caution when setting up the backup and confirm that the backup is running correctly by executing a trial run.

 
Learn more about SmarterMail's enterprise email features and benefits.

Feedback

Add Feedback
will this work for version 12?
Jon Eastwood (February 18, 2014 at 2:22 PM)
Hi, Jon. Yes, this will work with 12.x as well. Just forgot to modify the KB to the most current version. Sorry for the confusion.
Derek Curtis (February 18, 2014 at 2:45 PM)
What about Windows server backup, that should work to?

We backup everything on the server, as we do not have huge amounts on the server yet.

Backup destination is a dedicated big external USB drive...

Kenneth Knudsen (May 28, 2015 at 10:53 AM)
Hi Kenneth,
Windows server backup should be fine.

Brian Ward (May 28, 2015 at 11:58 AM)

Add Feedback