      A RECOVER(6)                    1993                     RECOVER(6)        NAME=      recover - recover a NetHack game interrupted by disaster    SYNOPSIS-      recover [ -d directory ] base1 base2 ...    DESCRIPTION A      Occasionally, a NetHack game will be interrupted by disaster A      when the game or the system crashes.  Prior to NetHack v3.1, A      these games were lost because various information  like  the A      player's  inventory  was kept only in memory.  Now, all per- A      tinent information can be written out to disk, so such games <      can be recovered at the point of the last level change.  A      The base options tell recover which files to process.   Each 7      base option specifies recovery of a separate game.   A      The -d option, which  must  be  the  first  argument  if  it A      appears,  supplies  a  directory  which is the NetHack play- A      ground.  It overrides the value from NETHACKDIR, HACKDIR, or A      the  directory  specified  by  the game administrator during 5      compilation (usually /usr/games/lib/nethackdir).   A      For recovery to be possible, nethack must have been compiled A      with  the  INSURANCE  option, and the run-time option check- A      point must also have been on.  NetHack normally  writes  out A      files  for levels as the player leaves them, so they will be A      ready for return visits.  When checkpointing,  NetHack  also A      writes  out  the level entered and the current game state on A      every level change.  This naturally slows level changes down       somewhat.  A      The level file names are of the form base.nn, where nn is an A      internal  bookkeeping number for the level.  The file base.0 A      is used for game identity, locking, and, when checkpointing, A      for  the  game state.  Various OSes use different strategies A      for constructing the  base  name.   Microcomputers  use  the A      character  name,  possibly  truncated  and  modified to be a A      legal filename on that system.  Multi-user systems  use  the A      (modified) character name prefixed by a user number to avoid A      conflicts, or "xlock" if the number of concurrent players is A      being  limited.   It  may  be necessary to look in the play- A      ground to find the correct  base  name  of  the  interrupted A      game.   recover will transform these level files into a save 6      file of the same name as nethack would have used.  A      Since recover must be able to read and delete files from the A      playground  and  create  files in the save directory, it has A      interesting interactions with game security.   Giving  ordi- A      nary  players  access to recover through setuid or setgid is A      tantamount to leaving the  playground  world-writable,  with A      respect  to both cheating and messing up other players.  For       A January                  Last change: 9                         1             A RECOVER(6)                    1993                     RECOVER(6)       A      a single-user system, this of course does  not  change  any- A      thing, so some of the microcomputer ports install recover by 
      default.   A      For a multi-user system, the game administrator may want  to A      arrange  for  all  .0  files  in the playground to be fed to A      recover when the host machine boots, and handle game crashes A      individually.    If  the  user  population  is  sufficiently A      trustworthy, recover can be installed with the same  permis- A      sions  the  nethack executable has.  In either case, recover @      is easily compiled from the distribution utility directory.   NOTES A      Like nethack itself, recover will overwrite  existing  save- A      files  of  the  same name.  Savefiles created by recover are A      uncompressed; they may be compressed afterwards if  desired, A      but  even  a compression-using nethack will find them in the       uncompressed form.    SEE ALSO      nethack(6)    BUGSA      recover makes no attempt to find out if a base  name  speci- A      fies a game in progress.  If multiple machines share a play- 3      ground, this would be impossible to determine.   A      recover should be taught to use the nethack playground lock- &      ing mechanism to avoid conflicts.                                                    A January                  Last change: 9                         2       