OSDN Git Service

add translation
[jnethack/source.git] / doc / recover.txt
1 RECOVER(6)                       Games Manual                       RECOVER(6)
2
3
4
5 NAME
6        recover - recover a NetHack game interrupted by disaster
7
8 SYNOPSIS
9        recover [ -d directory ] base1 base2 ...
10
11 DESCRIPTION
12        Occasionally,  a  NetHack game will be interrupted by disaster when the
13        game or the system crashes.  Prior to NetHack v3.1,  these  games  were
14        lost  because  various information like the player's inventory was kept
15        only in memory.  Now, all pertinent information can be written  out  to
16        disk,  so  such  games  can be recovered at the point of the last level
17        change.
18
19        The base options tell recover which files to process.  Each base option
20        specifies recovery of a separate game.
21
22        The -d option, which must be the first argument if it appears, supplies
23        a directory which is the NetHack playground.  It  overrides  the  value
24        from NETHACKDIR, HACKDIR, or the directory specified by the game admin-
25        istrator during compilation (usually /usr/games/lib/nethackdir).
26
27        ^?ALLDOCS For recovery to be possible, nethack must have been  compiled
28        with the INSURANCE option, and the run-time option checkpoint must also
29        have been on.  ^: ^?INSURANCE For recovery to be possible, nethack must
30        have  been compiled with the INSURANCE option (this configuration was),
31        and the run-time option checkpoint must also have  been  on.   ^:  This
32        configuration  of nethack was created without support for recovery.  ^.
33        ^.  NetHack normally writes out files for levels as the  player  leaves
34        them,  so  they  will  be ready for return visits.  When checkpointing,
35        NetHack also writes out the level entered and the current game state on
36        every level change.  This naturally slows level changes down somewhat.
37
38        The  level  file names are of the form base.nn, where nn is an internal
39        bookkeeping number for the level.  The file base.0  is  used  for  game
40        identity,  locking, and, when checkpointing, for the game state.  Vari-
41        ous OSes use different  strategies  for  constructing  the  base  name.
42        Microcomputers  use the character name, possibly truncated and modified
43        to be a legal filename on that  system.   Multi-user  systems  use  the
44        (modified) character name prefixed by a user number to avoid conflicts,
45        or "xlock" if the number of concurrent players is  being  limited.   It
46        may  be  necessary  to  look in the playground to find the correct base
47        name of the interrupted game.  recover will transform these level files
48        into a save file of the same name as nethack would have used.
49
50        Since recover must be able to read and delete files from the playground
51        and create files in the save directory, it has interesting interactions
52        with  game security.  Giving ordinary players access to recover through
53        setuid or  setgid  is  tantamount  to  leaving  the  playground  world-
54        writable,  with  respect to both cheating and messing up other players.
55        For a single-user system, this of course does not change  anything,  so
56        some of the microcomputer ports install recover by default.
57
58        For a multi-user system, the game administrator may want to arrange for
59        all .0 files in the playground to be  fed  to  recover  when  the  host
60        machine boots, and handle game crashes individually.  If the user popu-
61        lation is sufficiently trustworthy, recover can be installed  with  the
62        same  permissions  the nethack executable has.  In either case, recover
63        is easily compiled from the distribution utility directory.
64
65 NOTES
66        Like nethack itself, recover will overwrite existing savefiles  of  the
67        same  name.  Savefiles created by recover are uncompressed; they may be
68        compressed afterwards if desired, but even a compression-using  nethack
69        will find them in the uncompressed form.
70
71 SEE ALSO
72        nethack(6)
73
74 BUGS
75        recover makes no attempt to find out if a base name specifies a game in
76        progress.  If multiple machines  share  a  playground,  this  would  be
77        impossible to determine.
78
79        recover  should  be taught to use the nethack playground locking mecha-
80        nism to avoid conflicts.
81
82 COPYRIGHT
83        This file is  Copyright  (C)  Kenneth  Lorber  and  was  last  modified
84        2018/04/25  (version  NetHack-3.6.0:1.9).  NetHack may be freely redis-
85        tributed.  See license for details.
86
87
88
89 NETHACK                        14 December 2015                     RECOVER(6)