MOO-cows Mailing List Archive


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*# file doesn't get renamed to, so when the 
> machine comes up and calls restart, an old 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 $ then" line:
> if (-r $*#) then
> 	mv $ $
> 	mv $*# $
> endif

Don't do this!  Even if the partial DB successfully loads (unlikely), you have
almost certainly lost data.



Home | Subject Index | Thread Index