Just run :

sudo -u cyrus /usr/cyrus/bin/ctl_mboxlist -d > filename

and then after you have moved the old one out of the way (import over the old doesn't/didn't work well) then just do:

sudo -u cyrus /usr/cyrus/bin/ctl_mboxlist -u < filename

Before you start, let me clarify:

remove the files in /var/spool/imapdb/db -- and always do an rsync of /var/spool/imapdb to somewhere before starting in case things go horribly wrong.

B


Joe Finkle wrote:
Wow, that really stinks. At this point I dont really have a choice though. Can you give me specifics on how you made a flat text file backup and how you reconstructed things using that?

Thanks,
Lee


From: Robert Scussel <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
To: Joe Finkle <[EMAIL PROTECTED]>
CC: [EMAIL PROTECTED]
Subject: Re: Reconstructing Mailboxes - HELP!
Date: Tue, 29 Oct 2002 17:41:16 -0500

Last time we had this problem we had to move mailboxes.db out of the way, remove everything in /var/spool/imapdb/ and then recreate our mailboxes.db file from a flat text backup and then run reconstruct, which takes awhile depending on you number of users.

Hopes this helps,
B

Joe Finkle wrote:

Cyrus: 2.1.9

We suffered some data corruption on our cyrus box and the mailboxes.db and the db/ folder were lost. When we start cyrus, ctl_cyrusdb just hangs with the following strace:

open("/export/cyrus/imap/mailboxes.db", O_RDWR|O_LARGEFILE) = 6
fcntl64(6, F_SETFD, FD_CLOEXEC) = 0
fstat64(6, {st_mode=S_IFREG|0600, st_size=294912, ...}) = 0
select(0, NULL, NULL, NULL, {0, 1000}) = 0 (Timeout)
select(0, NULL, NULL, NULL, {0, 2000}) = 0 (Timeout)
select(0, NULL, NULL, NULL, {0, 4000}) = 0 (Timeout)
select(0, NULL, NULL, NULL, {0, 8000}) = 0 (Timeout)
select(0, NULL, NULL, NULL, {0, 16000}) = 0 (Timeout)
select(0, NULL, NULL, NULL, {0, 32000}) = 0 (Timeout)
select(0, NULL, NULL, NULL, {0, 64000}) = 0 (Timeout)
select(0, NULL, NULL, NULL, {0, 128000}) = 0 (Timeout)
select(0, NULL, NULL, NULL, {0, 256000}) = 0 (Timeout)
select(0, NULL, NULL, NULL, {0, 512000}) = 0 (Timeout)
select(0, NULL, NULL, NULL, {1, 0}) = 0 (Timeout)
select(0, NULL, NULL, NULL, {1, 0}) = 0 (Timeout)
select(0, NULL, NULL, NULL, {1, 0}) = 0 (Timeout)

The last line continues forever.

Given the above, I assume the problem is a corrupted mailboxes.db file. Im trying to run reconstruct -rf on each of the mailboxes (since reconstruct -m is disabled), but doing so with the the old mailboxes.db/db folder does not fix the hanging ctlcyrus_db problem. If I delete everying in the db folder and i delete the mailboxes.db file, reconstruct complains that it cant open the mailboxes.db file. I tried using a fresh cyrus install's db/mailboxes and reconstruct again runs for 1 second then ends doing nothing. Strace just shows it opening the files.

Any help would be much appreciated.

Thanks,
Lee

_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963


--
Robert Scussel
1024D/BAF70959/0036 B19E 86CE 181D 0912  5FCC 92D8 1EA1 BAF7 0959


_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963



--
Robert Scussel
1024D/BAF70959/0036 B19E 86CE 181D 0912  5FCC 92D8 1EA1 BAF7 0959

Reply via email to