[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Recovering from corrupted database



GOMBAS Gabor <gombasg@inf.elte.hu> writes:

Speaking mostly from memory now:

> How to dump a corrupted database?

If the db functions can't cope with it, we certainly don't provide any
way of doing it.

> If I dump & reload it with "db_dump -r" & db_load, will it work?

Could work, but I wouldn't bet on it. Chances are that parts of the
re-loaded database is still broken. But please try it.

> If I restore an older backup (made by "kadmin -l dump"), can the
> log_file defined for the database be used to replay changes made
> since the backup was taken?

In theory replay_log can do this. BUT it replays the whole log file,
which might well break if you start somewhere in the middle. You would
have to know what version you're at, which you could find out from
looking at the log-file from your backup, but you'd still have to hack
replay_log to ignore versions older than that (we should fix this).

If you have the *whole* log file from when you created the realm, you
should be able to re-apply it from scratch, though.

Getting a database from a slave server is probably the easiest way
out, but I guess you don't have any?

/Johan