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

# Re: Shutdown weirdness.

- Date: Wed, 10 Jan 1996 10:26:55 PST
- From:
- cc: MOO-COWS Mailing List <MOO-Cows.PARC@xerox.com>
- In-Reply-to: "CS Moo Admin's message of \"Tue, 09 Jan 1996 19:04:46 PST\" <Pine.SOL.3.91.960109215849.1063A-100000@seahorse>"

    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:

- Shutdown weirdness.

- From: CS Moo Admin <csmoo@acs.brockport.edu>

- Prev: Shutdown weirdness.
- Next: Shutting down without dumping?
- Index: MOO-cows
- Thread: MOO-cows

Home | Subject Index | Thread Index