Using Automator and Entourage to back up the MUD folder

Backup Entourage
Using Automator & Entourage Schedule

In this article, you will find out how you can configure your Mac to create a backup copy of the Microsoft User Data folder whenever you quit Entourage. While there have been some stability improvements with the latest version of Entourage (Entourage 2008), it is always a wise decision to back up the Entourage database.

There are a couple of solutions on the Entourage Help Page as well as this blog, and this method is in fact only an automatized version of telling the Finder to copy the MUD folder to a different location using an Entourage schedule. Previous options used iCal to schedule backup. At the same time, the automation might appeal to some users who would otherwise forget to back up their files, so let us have a look at how this process can be set up. Please note that this article is part of an ongoing series on backup procedures; check the blog for alternative solutions to find the one that suits you best.

First of all, you will need Automator (it’s installed by Apple in Applications) for this procedure. AppleScript is another solution for those who are running any version of Mac OS X earlier than Mac OS X 10.4 (Tiger), but I am not going to discuss any AppleScript solutions in this article (even though the procedure described below involves one very basic AppleScript).

Launch Automator. Choose the following actions, in the same order:

  • Ask for Confirmation
  • Run AppleScript
  • Get Specified Finder Items
  • Copy Finder Items

There may be occasions on which you do not want to back up. That is why Automator is instructed to ask for your confirmation. You can write a short dialogue, such as “Automator is about to back up the Microsoft User Data to another location. Do you want to proceed?” to remind you of what the procedure is about. Whenever the Automator script launches, you will be asked whether you want to proceed or not; clicking on Cancel will cancel the backup procedure, whereas the OK button informs Automator to move on to step 2.

The second step involves the creation of a small AppleScript that quits the Database Daemon for you. The Database Daemon is a small background application which, among other things, allows Office Notifications to launch regardless of whether Entourage is open or not. This program ought to be stopped before the database file is copied. Simply copy/paste the following lines into the AppleScript window in Automator:

tell application "Microsoft Database Daemon"
quit
end tell

[Note see Quit all Microsoft applications before backing up]

The third step tells Automator which files and folders you want to back up. You can be very specific here and instruct Automator to back up the database file only (to find out more about the Entourage database file, see here). However, I would recommend backing up the entire MUD folder, as it also contains files that may be useful to recover in case of a crash, such as temporary Word documents. Therefore, click on the Add button, navigate to ~/Documents/Microsoft User Data (where “~” stands for your user account) and hit OK.

The last step is necessary to instruct Automator where the file needs to be moved to. This backup location can be defined according to your own preferences; it can be any folder on the same hard disk, on another networked Mac, or preferably on an external hard disk. Choose a backup location, then save the Automator script. To do so, click on File>Save As, name it and choose “Application” as the file format.

An optional step for Growl users: you can also add a final action, “Show Growl Notification”, to see a Growl message once your backup is complete. You can type in any message you want, but you might want to be as descriptive and concise as possible. “Backup complete” will be just fine for that purpose.

The complete Automator script should look as follows:

The final step of the entire procedure involves the creation of a schedule in Entourage (to find out more about schedules, click here). In Entourage, click on Tools>Schedules and create a new schedule. Assign it a name, set the occurrence to On Quit, specify Launch Alias as the action and choose the newly created Automator application as the file that Entourage needs to launch. Click on OK, and you are done.

The next time you quit Entourage, you will be asked whether you want to back up your MUD folder, and you no longer need to worry about doing this manually from time to time.

N.B.: Please note that Entourage needs to be closed for a successful backup procedure. If Entourage remains open, it will keep modifying the database, which more often than not results in a damaged backup file. Any schedule occurrence other than On Quit is not recommended.

Added April 24, 2009: See article Quit all Microsoft applications before backing up for the latest info on what is needed to quit for a successful backup.

Share this:
  • Twitter
  • Facebook
  • del.icio.us
  • Digg
  • StumbleUpon
  • Google Bookmarks
  • PDF
  • Print

Comments are closed.