What the repair window in Contact by Zaweba does
If its database is damaged or missing, Contact by Zaweba opens a repair window to restore a backup or rebuild from saved emails, and keeps the damaged file.

A database holding years of customer conversations is the kind of thing you never think about until something goes wrong with it. A power cut at a bad moment, a failing disk or a file copied halfway can all damage it. Contact by Zaweba plans for that. If the database is damaged or missing, it opens a repair window instead of crashing.
What the repair window offers
When Contact starts and finds a problem with its database, the repair window appears in place of the usual main window. It explains that something is wrong and offers two ways to put it right: restore the latest good backup, or rebuild from the saved original emails.
Whichever you choose, the damaged file is moved aside, never deleted. That is an important safeguard. If the repair doesn't give you everything back, the damaged file still exists and may be useful, and nothing about trying a repair makes the situation worse.
Restoring the latest good backup
Contact makes an automatic backup once a day, keeping seven daily and four weekly copies by default, plus a copy before every upgrade. Restoring the latest good backup puts the database back as it was when that backup was made. Your records, tags, stars, notes, folders and settings return as they were.
Mail that arrived since the last backup comes back at the next check, because it is still on the server. Contact reads your mailbox without deleting or moving mail (spam aside), so the emails that arrived after the backup are waiting to be fetched again. Changes you made in Contact since the backup, such as new tags or notes, are what you might need to redo.
Rebuilding from the saved emails
Contact keeps the original emails it has collected. Rebuilding uses those to recreate the database. It is the route to take when no good backup is available, or when you'd rather start from the emails themselves.
Checks that catch problems early
A quick database check runs at each start, and a full one runs weekly. Most problems are caught by these checks before they cause trouble, which is how Contact knows to open the repair window rather than starting up and failing halfway through something.
Making sure repair has something to work with
Leave the automatic backups switched on. They cost little disk space and are what makes restoring quick.
Make your own full backup now and then. File > Back up everything writes one zip of database, attachments, original emails and settings. Keep a copy on another drive or a memory stick, because a backup on the same disk as the database doesn't help if the disk fails.
Don't open the database file with other tools or copy it while Contact is running. Copying a database mid-write is one of the easier ways to end up with a damaged copy.
Restore from backup, on the File menu, is there for planned restores too, such as moving to a new PC. It checks the backup first and keeps today's data aside.
Why it is built this way
Everything Contact stores lives on your own PC, with no Zaweba server keeping a copy. That keeps your customers' details private, but it also means looking after the data is Contact's job. Daily backups, start-up checks, a repair window that never deletes anything and mail that can always be fetched again from the server add up to a program that recovers from damage rather than leaving you to piece things together.