MOO-cows Mailing List Archive
[Prev][Next][Index][Thread]
Re: Shutdown weirdness.
CS Moo Admin writes:
> Recently the machine my MOO is on crashed. (This is not unusual, it's a
> Sun.) As usual, the moo caught the shutdown signal and produced a dump.
> However, the .db.new.#*# file doesn't get renamed to .db.new, so when the
> machine comes up and calls restart, an old .db.new file gets used. Is
> this unusal?
No, it's correct. If the file is still named with #*# at the end, then it is
*not* a complete dump of the database and you should therefore *not* use it.
When UNIX shuts down like that, it doesn't give all of the running processes
arbitrarily long to shut themselves down cleanly. Instead, after a short
while, it times out and unceremoniously blows away anything still running.
This usually includes the MOO server, since it takes it a while to make a
complete dump.
> To get around it, I added these lines to restart before the
> "if (-r $1.db.new) then" line:
>
> if (-r $1.db.new.#*#) then
> mv $1.db.new $1.db.new.bkup
> mv $1.db.new.#*# $1.db.new
> endif
Don't do this! Even if the partial DB successfully loads (unlikely), you have
almost certainly lost data.
Pavel
References:
Home |
Subject Index |
Thread Index