Quit all Microsoft applications before backing up

Backup Entourage
Quit all Microsoft apps!

This article adds new information that is necessary for a good backup of your Identity. Anything that interacts with the Entourage database needs to be quit in order to back-up the database. This means all Office applications and helper applications.

In previous articles on backup, we have had Entourage users quit Entourage and the Microsoft Database daemon. However, while I was testing a shell script to quit Entourage and the daemon to be used in my SuperDuper! nightly backup, I discovered in Entourage 2008 quitting the daemon does not quit Office Reminders. I queried my contacts in the MacBU for clarification. The following advice is a result of my conversation with developers.

To successfully backup your Entourage 2008 database:

  • Quit All Microsoft applications (Entourage, Word, Excel, PowerPoint, My Day, Office Reminders, Messenger)
  • Quit the Microsoft Database daemon & Office Reminders

Don’t backup your Identity using Time Machine on an hourly basis!

If the Entourage database is being written to during a backup, the backup could be corrupt. Because of this requirement, backing up Entourage on an hourly basis with Time Machine is not practical. You can create an automatic backup once a day for Time Machine to copy using an Automator workflow and automate the process using an iCal schedule.

Reminders/Notifications

New Info: Starting with Entourage 2008, Office Notifications are now called Office Reminders. It’s not simply a name change. The Microsoft Database daemon no longer quits Reminders in Entourage 2008.

Before 2008, the daemon owned telling the reminders app that there were reminders. With 2008, the daemon only owns launching the reminders app and the reminders app asks the daemon about what to show.

So what does this mean for Entourage 2008 users? We need to add to our scripts to not only quit Entourage and the Microsoft Database daemon, but to actually quit the application Office Reminders. For users of Entourage 2004 and Entourage X, you can continue to use the quit daemon script to quit Notifications, but you should add the quit script for Word, Excel, PowerPoint and Messenger.

What must I quit to be 100% safe?

Regardless of what method you choose to backup your Entourage Identity, when you back-up, no Microsoft Office product should be running. You should quit ALL Microsoft applications along with the hidden Microsoft Database daemon. This doesn’t just apply to users that backup using Time Machine.

  • Entourage
  • Office Reminders
  • My Day
  • Word
  • Excel
  • PowerPoint
  • Messenger
  • Microsoft Database daemon

What if I don’t have all these applications open? I just have Entourage open.

Even if you don’t normally, have all Microsoft applications open, why take the chance? The script works if not all are open.
We’ve had reports from some users that they were able to use backups from Time Machine, but you cannot rely on them not to contain corruption. I can say from personal experience in recovering data for clients that only had a Time Machine backup of their Identity folder, that the data is corrupted and very time consuming to salvage.
Do you really want to take a chance with your data by not quitting everything?


Scripts & Automator workflows to quit all

You can use this script , or you can edit your Automator workflow as shown below. The only flaw I can find with the script is if you have an open unsaved draft window in any Microsoft application, the script will fail. Download links provided for all scripts and workflows below.

[Note: Office for Mac Home and Student version users can use this workflow. It does not require any of the custom Office Automator actions.]
For details on using and editing the workflow see these previous posts:

Test your workflow or script

I suggest that you open all Microsoft applications. Make sure My Day is open and Office Reminders is also open. Create a task to make Reminders launch for the test. Open the Activity Monitor in Utilities. Sort by “Microsoft”. Everything will show up except My Day. Seems someone forgot to add Microsoft to My Day’s name.
Select Run Workflow or Run Script to be sure everything is correct. Watch all Microsoft applications quit along with the Microsoft Database daemon.

Download Links

Script to quit all Microsoft applications
Shell script to quit all Microsoft applications
Automator workflow to backup Identity for Time Machine backup
Automator workflow to backup your Identity to a folder on your computer

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

26 comments to Quit all Microsoft applications before backing up

  • Steve Y

    Does the MBU strive to make their Mac products not viable in real world offices?
    I’m the Sysadmin for a 60 person creative agency. It’s my responsibility to maintain working digital systems, and of course, that includes email and backups. The majority of my users are on laptops, so hardware is arriving and departing my LAN daily, I never know where a specific machine will be at a given time. This prevents me from scheduling a multi-step backup overnight.
    Putting the burden of backups on end users is guaranteed failure. It won’t happen reliably. But this isn’t a big deal, there are multiple automated, centralized backup systems to choose from, which will do the work for the humans.
    But per the above, to get a reliable backup of an Entourage database, I first have to make each of these people completely halt their workflow, close all open Office documents, quit 4 of their most used apps, then stand by while backups occur.
    Yeah, right.
    These people are paid to do work, not to stop working so the computer can do what it needs to do. The software is there to work for them, not vice versa.
    To put it mildly, this is impractical. How on Earth does Microsoft expect the system admin to reasonably provide reliable backups for users of Entourage 2008?
    “Keep 100% of your data in Exchange” doesn’t work- there are always quotas, and notes and tasks don’t sync to Exchange.
    Deploying the EWS beta is not an answer. It’s *beta*, and just as buggy as Entourage. (I’m a beta tester, I say this from experience.)
    Portable Home Directories won’t help- they would also require the database to not be changed while it’s synced.
    “Have all users quit all Office apps and wait” is simply unreasonable.
    I haven’t had an unrecoverable workstation harddrive failure since we started using Entourage/Exchange 15 months ago, but eventually, I will. It’s not going to be fun for me to explain “well, yes, I do back up… but all that email you had stored in local folders… sorry about that.” But I have to feel that’s my eventual destiny if my company continues to use Entourage.
    I can’t read the above post without feeling that the Mac Business Unit is completely clueless about how impractical that is. Many of my users don’t just occasionally open an Office app, to them, Office suite + browser = the entire computer.

  • I hope Microsoft reads our blog, but in case, I also suggest that you send this as feedback to Microsoft. Send Feedback to Microsoft. or when working in Office, you can use the “Send Feedback” option under the Help menu in all of the Office applications.
    One suggestion is to schedule this using the SuperDuper on the fly option that I just published in Backup Entourage with SuperDuper!. The backup will start when you attach a USB (or FireWire) drive, and the drive is then automatically un-mounted when the backup is complete. Running this during their lunch break or a scheduled meeting shouldn’t interfere with their work. You can edit the script openmicrosoftdatabasedaemon.sh mentioned in the article to restart all applications when backup is complete. Just note they will need to save all open windows before running the backup.

  • Steve Y

    I will share this separately with Microsoft- I know that the MVPs aren’t the official MS feedback mechanism. But I do think this is a good public forum to discuss this topic.
    I appreciate the SuperDuper suggestion, but has the major shortcoming I mentioned earlier: I can’t rely on users to back up their data themselves. The only backups that happen reliably are background and automated- I don’t trust myself to manually make frequent backups.
    Moving to a user-managed SuperDuper backup would also require management agreeing that this aspect of data protection should no longer be my job, but everyone else’s. I see that as a hard sell.

  • You can schedule this for what would be free time like lunch. Then in the shell script, you can add a count down that would show up in Growl to let the user know that backup will be starting in xx minutes. Since they are working you might want to give them a bit more time than this example. Here is an example that Bill Smith uses.
    /usr/local/bin/growlnotify -a SuperDuper! -m ‘SuperDuper! is ready to back up your Entourage Database. Please quit Entourage now. You have one minute.’
    sleep 30
    /usr/local/bin/growlnotify -a SuperDuper! -m ‘SuperDuper! is ready to back up your Entourage Database. Please quit Entourage now. You have 30 seconds.’
    sleep 20
    /usr/local/bin/growlnotify -a SuperDuper! -m ‘SuperDuper! is ready to back up your Entourage Database. Please quit Entourage now. You have 10 seconds.’
    sleep 10
    The only other possibility is to create a Task in Entourage to remind them to backup. There would then be a record of them checking the task was completed. Users that fail to complete the tasks and backup would be guilty of violating company policy. This opens up a new can of worms.

  • Steve Y

    Diane,
    The above is good advice for a widget factory, where everyone will take lunch at the appointed time- not earlier or later. It just doesn’t work that way at a creative agency. Lunch happens when it happens… sometimes over a presentation with a client.
    Powerpoint up and quitting during a presentation b/c it’s scheduled backup time is 12:30p is a risk I can’t introduce. Nor is declaring that everyone must interrupt their workflows to facilitate the needs of the software.
    Software needs to conform to the needs of the users. I feel that software developers frequently forget this, as the backup requirements for Entourage illustrate.
    I also admin multiple servers, which include MSSQL and mysql services. Both of these include the ability to do scheduled database backups, which can then be backed up by other software, and most importantly, properly restored. If I could just do this with Entourage, I’d be closer to an acceptable backup solution- disregarding the HUGE on-disk storage this would require.

  • Al Varnell

    > Test your workflow or script
    >
    > I suggest that you open all Microsoft applications. Make sure
    > My Day is open and Office Reminders is also open. Create a
    > task to make Reminders launch for the test. Open the Activity
    > Monitor in Utilities. Sort by “Microsoft”. Everything will show up
    > except My Day. Seems someone forgot to add Microsoft to My
    > Day’s name.
    >
    > Select Run Workflow or Run Script to be sure everything is
    > correct. Watch all Microsoft applications quit along with the
    > Microsoft Database daemon.
    >
    When I run the script the Microsoft Database Daemon quits and then restarts. I suspect there’s it’s a “keep alive” bit, but I haven’t had a chance to run that down yet.

  • Let me check into this and get back to you.
    Sorry, for the late reply. Movable Type notifications are not sending me emails for all comments.

  • Benno Thieme

    Steve Y,
    your criticism seems justified, and I hope that MBU comes up with a solution (likely not before the next version of Office for Mac, in my humble opinion).
    I am by no means as advanced a user as yourself, but in search of a solution I thought you might give the above proposals some credence. True, in your companies work environment it might be impossible to find a time of day to schedule back-ups, but is this true for all 24 hours in a day. I suggest you think about an automator script running during the very early morning hours (i.e. 2 – 4 a.m.). If I am not mistaken the Energy Saver Control Panel (I am a German Mac user, so please excuse my occasional mislabelling, but you should get my drift). Just have Entourage back up its databases to the users harddisk and then you can include it in your regular back-up schedule on the office LAN.
    Maybe this helps.

  • Steve Y

    Benno,
    It’s a good idea, but to implement would require
    1) My user machines to be awake. 90% of my users are on laptops, so they would have to be trained to plug in and not close laptops overnight. While I can require them to do that, we all know humans are unreliable.
    2) Every Office app to be quit. That means nobody could leave a partially completed Word, Excel or PowerPoint document open when they leave the computer for the evening.
    I appreciate your input, but I still don’t see an Entourage backup scenario that’s reasonable to implement.

  • Hi Steve,
    You can set your computer to wake in System Preferences. The script quits all Office applications, but you are correct, it will fail if they leave an unopened draft doc.
    I might suggest that reasonable would be to expect a professional to be competent enough to close down their work at the end of the day. That’s my 2 cents.

  • Steve, I just saw a thread on MacOSXHints forums that might be of interest.
    AppleScript to quit application if idle

  • Mark Kelleher

    When I check my system using Activity Monitor I also see “Microsoft AU Daemon” which I believe is Automatic Update.
    Can this be left running because it will not interact with the Entourage database (i.e. it updates the applications, not the database) or should it also be shut down please?
    Thanks for your help.

  • You are correct. This is the AutoUpdater. No worries about quitting it.

  • Steve Hunt

    Diane,
    You say “I might suggest that reasonable would be to expect a professional to be competent enough to close down their work at the end of the day.”
    This demonstrates how little you know of the way in which ‘creatives’ and many others (e.g. academics like myself) work. The idea of a conventional working day is anathema to many of us: we do the work as and when it needs doing, and when we have ideas we open our laptops and use them.
    Sometimes I use my laptop in my office (alongside my desktop machine), sometimes I am in a meeting room, sometimes I am in my kitchen, sometimes I sit up in bed and work at 2 in the morning, and sometimes I use my laptop early in the morning or late in the evening because I am working with colleagues in different time zones. All of this may make me a slave to my work, but it does not make me unprofessional. My laptop has several applications open more or less all the time, and it is simply put to sleep by closing the lid. Using System Preferences to wake it up and run a script is not an option … because a closed MacBook will not wake up when prompted in this way unless it is connected to an external keyboard and monitor.
    Steve Y is completely correct: expecting all users to ‘take responsibility’ for backing up their data is unreasonable when the software ought to do it for them, and expecting them all to stop work at the same time every day (like a bunch of Stepford Wives) while the backup system does its job is unrealistic. What would my students say if I told them that I couldn’t continue with their scheduled class because the SysAdmin had chosen this time to backup my emails and contacts?

  • Getting into a debate over what is reasonable is not productive. I can only offer solutions and workarounds for what Microsoft has given us. I don’t work for Microsoft and have no control other than giving my opinion on their products using feedback.

  • Steve Y

    I recently migrated my office backups to CrashPlan Pro- http://www.crashplanpro.com. While it violates the above MS best practices of quitting all applications and MS Database Daemon, the majority of Entourage Database backups I’ve restored and tested from CrashPlan have worked immediately. The ones that didn’t started up with the “the database is damaged, rebuild it” warning, and were successfully rebuilt.
    YMMV, but this is mostly working for me.

  • You might walk across the interstate and not get hit, but one day you could be killed. Do you really want to take that chance with your data? If yes, then it’s probably not very important. YMMV

  • Graeme Austin

    Hi all
    Just thought I’d let you know that I’ve written a couple of AppleScripts which get round some (but obviously not all) of the issues mentioned in this thread ie one script stores the state of open apps and their respective docs, and the other one re-opens relevant apps and docs once any copy has been done within Automator.
    The issue still remains that at some point for the backup to work, the user needs to stop using their machine for a short while (my laptop takes about 2 mins) so some form of discipline by the user must be exerted ie the computer must be on and not used. For my requirements, I am the user; I travel extensively across time zones for business, and my solution works for me. I also have lost sufficient data in my life to believe in extensive backing up.
    But, to be clear, I am not trying to re-start that bit of the debate about what is a reasonable expectation for a user, but I am happy to share the scripts with anyone interested and take coding criticism, positive and negative. If my code isn’t any good for your purpose, don’t bother using it 🙂

  • If you send the scripts to me, I’ll post them for download, or you can upload to ScriptBuilders. Look for an email from me so you can send the scripts. Subject: Entourage Scripts

  • I’ve posted the scripts for download at this link.
    This package is designed to safely close down MS applications before the Entourage database is copied to a backup location. It then opens up the MS applications after the copy, restoring any open windows and having saved any draft messages. Apps that were hidden before, will be hidden again.
    There are four files in this package:
    1. An Automator workflow called MUD Backup
    2. AppleScript CASS
    3. AppleScript OASS
    4. AppleScript RAMS

  • Lisa Schmid

    I have created a separate identity and can’t access it because every time I try to switch, it tells me to quit all Microsoft applications (I don’t have any others open besides Entourage) and then to restart. Each and every time, it does the exact same thing. I used the quit_all_Microsoft_applications and still it wouldn’t work. Is it becuase I am logged on to Time Machine? I have looked everywhere for advice and am lost. I need to get rid of the old exchange server account i have and use the new one but can’t if I can’t switch identities. Please Help!!

  • Open the Activity Monitor (it’s in Applications/Utilities). In the top search box, enter Microsoft. I’m guessing it’s Office Reminders that might still be open.
    You don’t have to create a new Identity, you can simply delete the old Exchange Identity and add your new one.
    Let me know if you still have problems.

  • We had a power outage the other day. Ever sense, my entourage won’t send emails, but will receive them. I’ve done some trouble shooting and nothing has worked. It appears re-installing is the last option. Is that the last option, and what is the best way to back up?
    Thanks
    Troy

  • Re-installing rarely fixes problems like this. Most likely the crash corrupted some files. Open Keychain Access and run Keychain First Aid. Delete that account (not delete the info but the account) and recreate.
    If this fails, create a new Identity under Switch Identity. Enter the account info and see if it works. If yes, then you could try rebuilding your Identity, but you might have to manually move your data into the new Identity. Rebuilding might not fix this type of corruption.
    How to manually move your data (when import fails and/or you need to move to a new Identity same version or revert to an older version)

  • I completely missed the fact that Notifications are now called Office Reminders.It has caused me untold pain, pretty similar expereince all round, so no point in elaborating on that. I would love to try out those scripts on offer.
    My mail is included in the post.
    Paul

  • At the bottom of the post you’ll see Download Links for the scripts mentioned.