[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

IMAP one way backup



The IMAP server where I work is not very reliable, and I would like to back it up each day of the week to a different directory, using cron. Although offlineimap does not provide 1-way backup, I set up offlineimap to do something like this. Basically I have an offlineimaprc file for each day of the week, that syncs the server to a separate hard drive on my machine (so .offlineimaprc.mon syncs to .offlineimap.mon, etc.). I then run offlineimap - c .offlineimaprc.mon on mondays, etc. Since the backup copies are never modified on my local machine, offlineimap should not make any changes to the server when it runs. The reason I keep several different backup copies is in case the server deletes lots of my messages and offlineimap were to then delete them off my local copy.

What now worries me is that if my local drive that I am syncning to were to die, I wonder if offlineimap might take that to mean that I deleted all my messages, and would delete all of them on the server. Reading the manual I see that one can delete the directory where all the info is stored. So if offlineimap is storing all of the info (not the mail messages) in a directory .offlineimap.mon, then simply deleting it after running should erase all of the stored info about the local mail, and the mail on the server would not be deleted if the messages disappeared on my local machine.

Does anyone know if this will work, or even if it is needed (perhaps offlineimap wouldn't delete all the messages on the server if it couldn't find the backup drive). Any suggestions on how others do one- say backup of an imap server would be appreciated.

Thanks,
Ric


Reply to: