Re: How can I restore the "\Seen" state from backup?
Hello, I have seen there is no solution of re-construction. The only way is to do imapsync. As long as I know, cyrus imapd comes with no solution of keeping user mail status. I tested to copy all /var/lib/imap files to the target server and do mail reconstruct, it worked but it is not practical since I have to shut down the cyrus server. Patrick - Original Message - From: "Ciprian Vizitiu" <[EMAIL PROTECTED]> To: Sent: Monday, April 10, 2006 4:54 AM Subject: How can I restore the "\Seen" state from backup? Hi everybody, SomeUser deletes SomeFolder by mistake; so I bring /var/spool/imap/s/user/someuser/SomeFolder content back from tape; I stop cyrus, I export mailbox.db, I edit it, add back user.someuser.SomeFolder default lrswpcida, import mailbox.txt, reconstruct -f -r someuser start cyrus. I can again subsribe to that folder BUT all mails are "brand new"; for some 8000 mails this might not be an option. What am I missing from the restoration process? Obviously I can not simply restore .../someuser.seen from tape as in between the deletion of the folder and my restoration from tape the user has "\Seen" other mails; someuser.seen is skiplist. 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 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
Re: How can I restore the "\Seen" state from backup?
Patrick T. Tsang wrote: > As long as I know, cyrus imapd comes with no solution of keeping user > mail status. > I tested to copy all /var/lib/imap files to the target server and do > mail reconstruct, it worked but it is not practical since I have to > shut down the cyrus server. As far as I know you do NOT have to shut down the server when running reconstruct. Has this changed in recent versions? Am I missing something, is there some other reason why you shut down the server? -- Scott Russell <[EMAIL PROTECTED]> IBM Linux Technology Center, System Admin 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
RE: How can I restore the "\Seen" state from backup?
> Patrick T. Tsang wrote: > > As long as I know, cyrus imapd comes with no solution of > keeping user > > mail status. > > I tested to copy all /var/lib/imap files to the target > server and do > > mail reconstruct, it worked but it is not practical since I have to > > shut down the cyrus server. > > As far as I know you do NOT have to shut down the server when > running reconstruct. Has this changed in recent versions? Am > I missing something, is there some other reason why you shut > down the server? Oh God, Patrick if you know the magic incantation please say it. I haven't been able to convince Cyrus to recognize a new mail folder restored from back-up other than exporting the mailbox.db into text editing it and reimporting the db. Can I do this without stopping Cyrus? :-o What I would love to have is an export/import API. Or better said, a back-up one. Ok, probably it will be really difficult to implement such a thing but it'll be a real boost to my productivity. 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
Re: How can I restore the "\Seen" state from backup?
Ciprian Vizitiu wrote: > Oh God, Patrick if you know the magic incantation please say it. I haven't > been able to convince Cyrus to recognize a new mail folder restored from > back-up other than exporting the mailbox.db into text editing it and > reimporting the db. Can I do this without stopping Cyrus? :-o > I do this to restore a mailbox while cyrus is running. While I'm not certain it is needed, I also prevent the user from logging in during this process. I don't bother to stop incoming mail delivery though. 1) Make sure the top level mailbox exists in mailboxes.db. If it doesn't then use cyradm to create the top level mailbox first. 2) Restore the files and copy them into the mailbox. 3) Run reconstruct -rf user.accountname and wait. Also, see Simon Matter's RPM for some handy scripts that run from cron. These scripts will help keep your mailboxes.db file backed up. The default RPM install has them running daily but you can run them on any other schedule you like, of course. -- Scott Russell <[EMAIL PROTECTED]> IBM Linux Technology Center, System Admin 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