If you do not have an uncorrupted hot backup, but have archive backups and their transaction logs, you can restore the most current uncorrupted version of the archived database by performing the following steps:
Identify any log files that were unapplied or open for writing in the corrupted live database directory.
Close the log that was open for writing. It contains the most recent transactions.
Create a new (recovery) directory.
Copy the most recent archive copy and its log files into the new recovery database directory.
Copy any unapplied log.* files from your corrupted live database directory into your new recovery database directory.
Run db_recover with the -c-h options specified against the new recovery database.
For example, if your new recovery directory is called recoverydb, then the command would be as follows:
db_recover -c -h recoverydb
Leave the log.* files in the new recovery directory.
The db_recover program applied the log files to the new recovery databases, but starting with version 4.2, Berkeley DB expects the log files to still be there.
Run db_verify against the database files in the new recovery directory.
Steps in the To Restore a Hot Backup procedure, explains how to run db_verify.
Run csdb -v list against the new recovery directory.
If the new recovery directory passed all three preceding recovery steps, replace the old corrupted live database with the new recovery database.
Copy the new live database into your hot backup directory to function as the new snapshot.
Start Calendar Server.
If the new recovery directory failed any of the steps, identify an uncorrupted older archive backup as follows:
Working backward through your archive backup copies, find the most recent copy that is not corrupted by running the three recovery programs against each of them in turn: db_recover -c-h, db_verify, and csdb -v list.
The first archive copy that passes can be restored to your live database directory.
Replace the corrupted live database with the clean archive backup, as shown in To Restore an Archive Backup.
If none of your archive backups work, call technical support.