> #stop cyrus
> #create backup of your mailboxes.db
> ctl_mboxlist -d > /tmp/mboxlist
> vi /tmp/mboxlist
> ctl_mboxlist -u < /tmp/mboxlist
> # Limit access to cyrus e.g. via firewall so that you can test
> # if cyrus is running without any problem and nobody is creating/deleting
> folder
> # or changing acls, so that you can use your backup of your mailboxes.db in
> case
> # somthing went wrong

This didn't work.  "ctl_mboxlist -U < edited_dump" didn't produce any output
but also did not delete the folder I'd removed.  But!


On Tue, Mar 04, 2025 at 11:20:41PM +0100, Michael Menge wrote:
> just to check, the mailbox "user.[redacted]" does still exist?

In some cases, the corresponding directories existed but were empty.
In other cases, the corresponding directories did not exist.

> you can try to create the folder in the filesystem, and set user
> and group and then try reconstruct again.
> 
> Also you can use "strace -o /tmp/reconstruct.trace reconstruct -r
> user.[redacted]"
> this will give you a ton of systemcalls but at the end you will most likely
> see
> the directories/files that cyrus does try to access and the error message.

The output of "strace" gave me enough information to fix this (at least
for one case where the directory existed but was empty).  I had to create
a(n empty) "cyrus.headers" file where "reconstruct" was looking for it and
set ownership and permissions properly.  Then the "reconstruct" succeded
and I was able to delete the resulting folder in "cyradm".

(I only tried this on the one folder that was in this state on the new
server, which had a directory but no "cyrus.header" file.  I presume
creating directories and "cyrus.header" files as needed on the old server
would work too.  Still a little curious about how we might have gotten
into this situation in the first place, although folder names sometimes
hint that restores from tape might have been involved at some point in
the past.)

Thanks so much!

Jay

------------------------------------------
Cyrus: Info
Permalink: 
https://cyrus.topicbox.com/groups/info/Te4b694eca4c5d369-M09e63e697514b85abfaddf52
Delivery options: https://cyrus.topicbox.com/groups/info/subscription

Reply via email to