Restore mail from backup

Per-Olov Sjöholm pos at incedo.org
Thu Apr 14 16:22:22 EDT 2005


On Monday 11 April 2005 17.13, Hamish wrote:
> On Monday 11 April 2005 15:29, Henk.Roose at cwi.nl wrote:
> > Hamish wrote:
> > > On Monday 11 April 2005 14:07, Dave McMurtrie wrote:
> > > > Hamish wrote:
> > > > > Hello everyone
> > > > > I am having trouble restoring files from a backup, I have made the
> > > > > backup just with rsync, so i have the contents of the
> > > > > spool/domain/mydomain.com/user/myuser in the backup. It seems that
> > > > > the user's mailbox has been deleted, so what I aim to do is create
> > > > > a new user with the same name, copy the files from the backup, then
> > > > > run reconstruct (please tell me if this is wrong)
> > > > > I copy the files across, but in cyradm when `running reconstruct
> > > > > user/myuser at mydomain.com`
> > > > > gives Operating System Error.
> > > > > Could someone point me in the right direction?
> > > > > Thanks,
> > > > > H
> > > >
> > > > The restored files are owned by root instead of your cyrus user?
> > >
> > > Thanks for the suggestion, but no they are owned by the cyrus user (I
> > > am using a kolab server, so the user is kolab-r). I have found that I
> > > cannot reconstruct even a new mailbox, is this normal?
> >
> > AFAIK (running 2.1.18) you need to run reconstruct (as the cyrus user) as
> > 'reconstruct -r user.myuser'
> > The dot (.) is the hierarchy separator.  The -r is for recursively.
>
> I managed to get it right by using cyrreconstruct, instead of cyradm, not
> sure why this worked like this though!
> Thanks for the suggestions,
> H

Make sure to do something like this in cron:
--
su -m cyrususer -c '/usr/local/libexec/ctl_mboxlist -d 
> /var/imap/mailboxes.db-dump'
--

Tell me if I am wrong... but I think this mailboxes.db file is the only file 
that cannot be restored with any reconstruct commands. In other words... It's 
important to backup. This dump give it to you in text form. I think the 
running mailboxes.db file is in binary.

And are you sure your rights etc are correct on your folder now? This as this 
database describes the rights on the files etc..


Regards
/Per-Olov
-- 
GPG keyID: 4DB283CE
GPG fingerprint: 45E8 3D0E DE05 B714 D549 45BC CFB4 BBE9 4DB2 83CE
---
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
Cyrus Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html




More information about the Info-cyrus mailing list