Skip navigation
This discussion is archived

/var/spool/imap and Time Machine

8431 Views 13 Replies Latest reply: Jul 2, 2008 3:32 PM by titaniumtroop RSS
peterb123 Level 1 Level 1 (10 points)
Currently Being Moderated
Nov 21, 2007 3:28 PM
Hi,

after upgrading my G4 Mini from 10.5 Server to 10.5.1 Server, the machine didn't boot any more.
When trying to restore from my Time Machine volume, I figured out that /var/spool/imap is not being backuped up by Time Machine.

I double checked on another 10.5 server, same thing here.

Any ideas to make Time Machine also copy /var/spool?

Since /var/imap is on Time Machine - the db files in that directory do not contain eMail bodies, right?

Thanks for any help - I don't want to lose my 5 year email archive...

Cheers from Germany,
Peter
iMac, Mini, Macbook, iBook, Mac OS X (10.5.1)
  • Dean Huxley Level 1 Level 1 (130 points)
    Currently Being Moderated
    Nov 21, 2007 4:55 PM (in response to peterb123)
    peterb123 wrote:
    Hi,

    after upgrading my G4 Mini from 10.5 Server to 10.5.1 Server, the machine didn't boot any more.
    When trying to restore from my Time Machine volume, I figured out that /var/spool/imap is not being backuped up by Time Machine.

    I double checked on another 10.5 server, same thing here.

    Any ideas to make Time Machine also copy /var/spool?

    Since /var/imap is on Time Machine - the db files in that directory do not contain eMail bodies, right?

    Thanks for any help - I don't want to lose my 5 year email archive...


    I haven't investigated this fully, but it seems like there are several services that are stopped, then archived somehow, then restarted during a Time Machine backup. I've noted that mail is one of them. It is shutdown and restarted and sometime in between it appears to do something to backup the /var/spool files, but it doesn't just mirror them onto the backup volume. I have done a full Time Machine restore (from the install DVD) and nothing was lost.

    So while files and directories under /var/spool don't appear to be backed up, the contents seem to be rebuilt during a restore.
    various G4, G5 and Intel Macs, Mac OS X (10.5.1)
  • Dean Huxley Level 1 Level 1 (130 points)
    Currently Being Moderated
    Nov 22, 2007 8:51 AM (in response to peterb123)
    peterb123 wrote:
    In my case, imapd and postfix do not start after TimeMachine restore.
    They both complain about not existing /var/spool/{imap,postfix}, and both are correct.
    In my Time Machine backup, /var/spool is empty.


    Hmm, obviously the Time Machine restore didn't do it's job. I can only say that it worked for me a couple of days ago and the /var/spool directories on my Time Machine backup drive are also empty. I'd suggest calling AppleCare for support. They may be able to help you.
    various G4, G5 and Intel Macs, Mac OS X (10.5.1)
  • Dean Huxley Level 1 Level 1 (130 points)
    Currently Being Moderated
    Nov 26, 2007 5:10 PM (in response to Dean Huxley)
    Dean Huxley wrote:
    Hmm, obviously the Time Machine restore didn't do it's job. I can only say that it worked for me a couple of days ago and the /var/spool directories on my Time Machine backup drive are also empty. I'd suggest calling AppleCare for support. They may be able to help you.


    I just did another Time Machine restore and this time I ended up with /var/spool/{postfix,imap} not existing and nothing working. This appears to be a common problem. I'm trying another restore from an earlier backup.
    various G4, G5 and Intel Macs, Mac OS X (10.5.1)
  • Dean Huxley Level 1 Level 1 (130 points)
    Currently Being Moderated
    Dec 11, 2007 7:12 PM (in response to Dean Huxley)
    Dean Huxley wrote:
    I just did another Time Machine restore and this time I ended up with /var/spool/{postfix,imap} not existing and nothing working. This appears to be a common problem. I'm trying another restore from an earlier backup.


    I didn't have any luck with other restores, but I think I understand why now. Previously when the restore worked, the server was in Standard mode. A week or two later I ran into OpenDirectory problems and the Apple support guy walked me through switching to Advanced mode and how to rebuild the OD master. Everything seemed to be fine, but the Time Machine backups were no longer backing up the data in /var/spool and several other important directories. When it came time to restore, I had nothing but problems.

    It appears the "magic" works in Standard mode but not in Advanced. I guess this explains a "Not Used" in the Advanced column on page 27 of the getting started book. During Time Machine backups in Standard mode, a command called SBSBackup is run to suspend services nicely then backup service related files into a /.ServerBackups directory. When the backup is done, another SBSBackup command is run to remove the /.ServerBackups directory (as it will have already been backed up via TimeMachine.) If a restore is done, the /.ServerBackups directory is what is used to repopulate things like /var/spool, etc.

    Before anyone gets interested in reinstalling with Standard mode just to get recoverable Time Machine backups, I should point out that this SBSBackup has some "interesting" side effects. Because Time Machine runs hourly and the SBSBackup stops services, occasionally it's noticeable that something isn't running. Clients running Mail will frequently get the grey lightning bolt when they go to check mail and the service is down during the backup. Also, I think one of the times my server was corrupted was when the machine was rebooted while a /.ServerBackups was being created just before a backup. After I rebooted, some configuration files were missing and I suspect that the boot process checked this directory to automatically do restores of certain services then failed halfway through.

    To summarize, anyone using Advanced mode will have to rely on something other than Time Machine for full system backups.
    various G4, G5 and Intel Macs, Mac OS X (10.5.1)
  • Jack Repenning Calculating status...
    Currently Being Moderated
    Jan 17, 2008 5:07 PM (in response to Dean Huxley)
    This problem also happens to Leopard Workstation users (i.e., me). This may be somewhat at odds with the idea that it's related to Server Advanced Mode.
    MacBook Pro (2x2.16GHz, 2Gb RAM, 100Gbx7200), Mac OS X (10.5.1), iMac G5, iBook, Parallels/WinXP, linux
  • Urs Aregger1 Level 1 Level 1 (5 points)
    Currently Being Moderated
    Mar 26, 2008 5:21 AM (in response to Dean Huxley)
    Don’t know the side effects yet but I deleted the line

    <string>/private/var/spool</string>

    in section <key>ContentsExcluded</key> of
    /System/Library/CoreServices/backupd.bundle/Contents/Resources/StdExclusions.pli st

    Now it backups also my /var/spool directory.
  • pterobyte Level 6 Level 6 (10,910 points)
    Currently Being Moderated
    Mar 26, 2008 5:45 AM (in response to Urs Aregger1)
    The is a reason these directories are excluded. Mail services are a life system with many file changes continuously occurring. Chances are very high that recovering from a Time Machine backup will leave you with broken mail services and/or missing data.
    Mac OS X (10.5.2)
  • Marcus Bointon Calculating status...
    Currently Being Moderated
    Apr 9, 2008 6:04 AM (in response to peterb123)
    I've got a similar problem on a 10.5.2 server. In this case it's fresh out of the box - mail services have never been used (though they are enabled in server admin) - and it has never been restored from time machine. Despite this, mail seems quite broken.

    To start with I noticed lots of these errors in mailaccess.log:

    DBERROR: critical database situation
    DBERROR db4: unable to join the environment
    DBERROR db4: PANIC: fatal region error detected; run recovery

    I've run mailbfr to fix things, but it's been having trouble, for example -i can't cope with there being no /etc/crontab, then -f complained that /var/spool/imap/user doesn't exist, and after having run that, I now get

    DBERROR: reading /var/imap/db/skipstamp, assuming the worst: no such file or directory

    in mailaccess.log, though the original errors seem to have stopped.

    I'm a bit disappointed that it should all be this broken on a fresh install.

    What should I try next?
    Mini C2D, Mac OS X (10.5.2), Server
  • pterobyte Level 6 Level 6 (10,910 points)
    Currently Being Moderated
    Apr 9, 2008 6:17 AM (in response to Marcus Bointon)
    Before mail services will work, you need to enable them in Server Admin AND add users to WGM. Once you add users, you need to make sure they are mail enabled in WGM and have access privileges.

    Before there are any users, there is nothing to fix, be it for mailbfr be it for the cyrus reconstruct utility itself.

    If you don't need mail, disable it completely. If you need it, start by setting it up.

    If you need more help, please open a new thread as this has nothing to do with the original poster's question.
    Mac OS X (10.5.2)
  • Marcus Bointon Level 1 Level 1 (0 points)
    Currently Being Moderated
    Apr 9, 2008 7:17 AM (in response to pterobyte)
    {quote:title=pterobyte wrote:}
    Before mail services will work, you need to enable them in Server Admin AND add users to WGM. Once you add users, you need to make sure they are mail enabled in WGM and have access privileges.
    {quote}

    I'd done all that. Anyway, it's now working as I think mailbfr did fix something - I couldn't even connect before. I think the missing spool folder was fixed by actually connecting, as that seemed to cause the /var/spool/imap/user folder to be created, even though the users had been defined and had email enabled for quite a while.

    Thanks for the pointers, and apologies for getting the wrong thread.
    Mini C2D, Mac OS X (10.5.2), Server
  • sugarmice Calculating status...
    Currently Being Moderated
    Jun 13, 2008 2:05 AM (in response to pterobyte)
    A slightly busted backup is still better than no backup at all. Cyrus' indexes can always be rebuilt. I've just run into this when I needed to do a full restore for the first time (after this weeks QuickTime update trashed by machine completely), and I've lost four months' worth of mail in my inboxes. This is, quite frankly, completely unacceptable for a system which is supposed to be doing a full backup. If it is purposely excluding certain directories, it should at least be telling me what those directories are that are being excluded, so that I can make my own arrangements.

    Mailman isn't working either after the restore, and I haven't worked out what else is missing that I need to resurrect from a very old disk image backup that I have.
    iMac, Mac OS X (10.5.3)
  • titaniumtroop Calculating status...
    Currently Being Moderated
    Jul 2, 2008 3:32 PM (in response to Urs Aregger1)
    Have you noticed any unintended side effects of deleting the /private/var/spool entry from the StdExclusions.plist file? Have you applied any OS updates since performing this step, and if so, did the update overwrite your changes to the .plist file?

    Thanks in advance for the update,
    Nathan
    OSX Server on Mac Pro, Mac OS X (10.5.3)

Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.