big faillure -> recovery

Tijl Dullers tdullers at anubex.com
Thu Sep 5 11:00:37 EDT 2002


Quoting Emilio Recio <erecio at storm.jmc.tju.edu>:

Emilio thanks a lot for you advice , I will try this tonight when I can permit 
myself to down those services , ... 

I have one little question , after running the little script to remake a 
mbox_list format file I only have entries for the users in it ,not for their 
subfolders etc etc , ... will the reconstruct rebuild the indexes for their 
subfolders? 

Best Regards, 

Tijl


> Tijl Dullers wrote:
> 
> >Someone knows a way how to fix this ? 
> >  
> >
> Here's what you do. It seems like your db file is completely foobar'd.
> 
> 1) bring cyrus imapd down
> 2) su to cyrus (or the cyrus user)
> 3) ./ctl_mboxlist -d > /tmp/foo.lst (Look at foo.lst to see if there's 
> anything in it. If you have a list of users in there from a - z then you 
> have most of the user information. Otherwise, you are going to need to 
> create the users manually - or script it if there are a large number of 
> users.)
> 4) Now that you have the user accounts, you need to add the mailboxes to 
> each of the users' accounts: ./reconstruct -rf user.*
> 5) I've noticed that sometimes after running that reconstruct command I 
> would have to do it twice.
> 
> If your db file is completely foobar'd. Then you need to go to:
> cd /var/spool/imap/user # (or similar cyrus mailstore partition)
> for i in `ls`
> do
>     echo "user.${i}    default    ${i}    lrswipcda" > /tmp/newdump.lst
> done
> 
> The above script takes each entry in your /var/spool/imap/user 
> directory, and creates a plain text entry for them in the same format as 
> the ctl_mboxlist -d command. Note that the column separators are tabs. 
> Once the plain text file is done, then you can import it using 
> ctl_mboxlist -u. WARNING!! Backup your mailboxes.db file, and then 
> DELETE the existing one. (you cannot do this fresh import on a foobar'd 
> file.)
> 
> Hope this helps,
> Elmo (polywog)
> 
> 






More information about the Info-cyrus mailing list