ctl_cyrusdb questions, looking for answers

Michal Hlavinka mhlavink at redhat.com
Tue Mar 24 12:18:06 EDT 2009


Hi,

thanks all for the answers. Some summary what I know (please correct me if I'm 
wrong):


1) checkpointing

"Checkpointed" are this databases:

quotas.db
tls_sessions.db
deliver.db
statuschache.db
annotations.db
mailboxes.db
ptclient/ptscache.db

but only DBs with Berkeley DB-Engine it does something. So really checkpointed 
are:

tls_sessions.db
deliver.db
statuschache.db
ptclient/ptscache.db

And checkpointing here only means sync and commit changes if there is a lot of 
them.

2)backuping

Backuped are only this databases:

mailboxes.db
annotations.db
quotas.db

there is no need to backup deliver.db, statuscache.db, or tls_sessions.db. 
These can be rebuilt with no data loss.

But what about ptclient/ptscache.db ?

3) "real" backup

when I want to create "real" backup (for example for hdd failure) I need to 
backup only

mailboxes.db
annotations.db
quotas.db

from /var/lib/imap (or from /var/lib/imap/db.backup1 ?) or something else?

4)check corrupted db

There is no tool I can use to check if database is corrupted. I can only check 
logs for errors (will cyrus-imapd terminate or will it work with corrupted 
database - so I can easily miss the error in the logs?). Can I use chk_cyrus 
for this somehow?

5) ctl_cyrusdb -r

I'm not completely sure what is effect of ctl_cyrusdb -r (it's executed always 
when cyrus-imap is starting)

This means that not committed changes (everything after last ctl_cyrusdb -c ) 
are thrown away? Or it's just check "everything is ok" ?

6) ctl_cyrusdb -r  VS. ctl_cyrusdb -r -x

When -x is specified it does nothing? See ctl_cyrusdb.c source:

>	switch (op) {
>	case RECOVER:
>	    break;

...

>    if(op == RECOVER && reserve_flag)
>	recover_reserved();

reserve_flag = 1 only when there is no -x

But there are also cyrus_init(alt_config, "ctl_cyrusdb", 0); in the beginning 
and cyrus_done(); at the end, so maybe they are doing something?

Regards,
Michal



More information about the Info-cyrus mailing list