1
2
3
4RECOVER(6)                    1993                     RECOVER(6)
5
6
7
8NAME
9     recover - recover a NetHack game interrupted by disaster
10
11SYNOPSIS
12     recover [ -d directory ] base1 base2 ...
13
14DESCRIPTION
15     Occasionally, a NetHack game will be interrupted by disaster
16     when the game or the system crashes.  Prior to NetHack v3.1,
17     these games were lost because various information  like  the
18     player's  inventory  was kept only in memory.  Now, all per-
19     tinent information can be written out to disk, so such games
20     can be recovered at the point of the last level change.
21
22     The base options tell recover which files to process.   Each
23     base option specifies recovery of a separate game.
24
25     The -d option, which  must  be  the  first  argument  if  it
26     appears,  supplies  a  directory  which is the NetHack play-
27     ground.  It overrides the value from NETHACKDIR, HACKDIR, or
28     the  directory  specified  by  the game administrator during
29     compilation (usually /usr/games/lib/nethackdir).
30
31     For recovery to be possible, nethack must have been compiled
32     with  the  INSURANCE  option, and the run-time option check-
33     point must also have been on.  NetHack normally  writes  out
34     files  for levels as the player leaves them, so they will be
35     ready for return visits.  When checkpointing,  NetHack  also
36     writes  out  the level entered and the current game state on
37     every level change.  This naturally slows level changes down
38     somewhat.
39
40     The level file names are of the form base.nn, where nn is an
41     internal  bookkeeping number for the level.  The file base.0
42     is used for game identity, locking, and, when checkpointing,
43     for  the  game state.  Various OSes use different strategies
44     for constructing the  base  name.   Microcomputers  use  the
45     character  name,  possibly  truncated  and  modified to be a
46     legal filename on that system.  Multi-user systems  use  the
47     (modified) character name prefixed by a user number to avoid
48     conflicts, or "xlock" if the number of concurrent players is
49     being  limited.   It  may  be necessary to look in the play-
50     ground to find the correct  base  name  of  the  interrupted
51     game.   recover will transform these level files into a save
52     file of the same name as nethack would have used.
53
54     Since recover must be able to read and delete files from the
55     playground  and  create  files in the save directory, it has
56     interesting interactions with game security.   Giving  ordi-
57     nary  players  access to recover through setuid or setgid is
58     tantamount to leaving the  playground  world-writable,  with
59     respect  to both cheating and messing up other players.  For
60
61
62
63January                  Last change: 9                         1
64
65
66
67
68
69
70RECOVER(6)                    1993                     RECOVER(6)
71
72
73
74     a single-user system, this of course does  not  change  any-
75     thing, so some of the microcomputer ports install recover by
76     default.
77
78     For a multi-user system, the game administrator may want  to
79     arrange  for  all  .0  files  in the playground to be fed to
80     recover when the host machine boots, and handle game crashes
81     individually.    If  the  user  population  is  sufficiently
82     trustworthy, recover can be installed with the same  permis-
83     sions  the  nethack executable has.  In either case, recover
84     is easily compiled from the distribution utility directory.
85
86NOTES
87     Like nethack itself, recover will overwrite  existing  save-
88     files  of  the  same name.  Savefiles created by recover are
89     uncompressed; they may be compressed afterwards if  desired,
90     but  even  a compression-using nethack will find them in the
91     uncompressed form.
92
93SEE ALSO
94     nethack(6)
95
96BUGS
97     recover makes no attempt to find out if a base  name  speci-
98     fies a game in progress.  If multiple machines share a play-
99     ground, this would be impossible to determine.
100
101     recover should be taught to use the nethack playground lock-
102     ing mechanism to avoid conflicts.
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129January                  Last change: 9                         2
130
131
132
133