salvage man page on DigitalUNIX

Man page or keyword search:  
man Server   12896 pages
apropos Keyword Search (all sections)
Output format
DigitalUNIX logo
[printable version]

salvage(8)							    salvage(8)

NAME
       salvage - Recover file data from damaged AdvFS file domains

SYNOPSIS
       /sbin/advfs/salvage [-x	| -p] [-l] [-S] [-P] [-v number] [-d time] [-D
       directory] [-L path] [-o option] [-F format[-f [archive]]] {-V  special
       [-V special]... | domain} [fileset[path]]

OPTIONS
       Specifies  that	the  utility  attempt to recover only those files that
       have been modified after the time.  Specify the time as a decimal  num‐
       ber in the following format: [[CC]YY]MMDDhhmm[.SS]

	      The  paired  decimal numbers in the format represent the follow‐
	      ing:

	      CC The first two digits of the year (the century)

	      YY The second two digits of the year (00-99)

	      MM The month of the year (01-12)

	      DD The day of the month (00-31)

	      hh The hour of the day (00-23)

	      mm The minute of the hour (00-59)

	      SS The second of the minute (00-61)

	      Both CC and YY are  optional.   If  neither  is  specified,  the
	      curent  year  is the default.  If YY is specified but CC is not,
	      CC is derived as follows:	 If YY is 69-99, CC is 19;  if	YY  is
	      00-68, CC is 20.

	      The range for SS is 00-61 rather than 00-59 because of leap sec‐
	      onds.  If SS is 60 or 61 and the resulting time (as affected  by
	      the  TZ  environment  variable) does not refer to a leap second,
	      the resulting time is one or two seconds after a time  where  SS
	      is  59.	SS is not a given value; it is assumed to be 0 (zero).
	      Specifies the path of the directory to which all recovered files
	      are  written.   If  you  do not specify a directory, the utility
	      writes recovered files to the current working directory.	Speci‐
	      fies  verbose mode for messages written to the log file.	If you
	      specify this option, the utility writes a	 message  to  the  log
	      file  for	 every	file  that is encountered during the recovery.
	      The message contains the file name and file status. You  specify
	      the path of the log file by using the -L option.

	      If  you do not specify this option, the utility writes a message
	      to the log file only  for	 partially-recovered  and  unrecovered
	      files.  Specifies the path of the directory or the file name for
	      the log file you choose to contain messages logged by the	 util‐
	      ity.

	      When your path specification includes a log file name, the util‐
	      ity uses that name for the log file.

	      When your path specification does not include a log  file	 name,
	      the  utility  places the log file in that directory and names it
	      salvage.log.pid, where  pid  is  the  process  id	 of  the  user
	      process.

	      When  you do not specify this option, the utility places the log
	      file  in	the  current  working  directory  and  names  it  sal‐
	      vage.log.pid.   Specifies	 the  action  the utility takes when a
	      file being recovered already exists in the directory to which it
	      is to be written.

	      The  values  for option are: Overwrite the existing file without
	      querying the user.  This is the default action  when  option  is
	      not  specified.	Do  not	 overwrite the existing file.  Ask the
	      user whether to overwrite the existing file.

	      If you do not specify this option,  the  default	action	is  to
	      overwrite an existing file without querying the user.  Specifies
	      that  the	 utility  identifies  a	 partially-recovered  file  by
	      appending	 to  its file name.  If you do not use this option, no
	      file name extensions are added to partially-recovered files.

	      Do not use the -p option with the -x  option.   If  you  do,  an
	      error  message  is  displayed and the utility exits with an exit
	      value of 2.  Specifies that the progress	indicators  should  be
	      turned  on  and a progress message printed at regular intervals.
	      The progress indicators can be useful if	salvage	 is  taking  a
	      long  time  to  run  on a very large domain.  Specifies that the
	      utility is to run in sequential search mode, checking each  page
	      on  each volume in the domain.  This mode of operation will take
	      a long time on large AdvFS file domains.

	      The -S option can be used to recover most files  from  a	domain
	      which has been damaged from an incorrect execution of the mkfdmn
	      utility.	In some cases, the  recovery  will  need  to  generate
	      names  based on the file's tag number.  These cases usually hap‐
	      pen in the root directory,  because  mkfdmn  usually  overwrites
	      this directory.

	      When  you	 specify the -S option, there may be a security issue,
	      because the utility  could  recover  old	filesets  and  deleted
	      files.   Specifies  that	salvage should recover files in an ar‐
	      chive format instead of directly	to  a  filesystem.   The  only
	      legitimate  value	 for  format is tar.  The salvage command uses
	      the  next	 argument   as	 the   name   of   the	 archive,   or
	      /dev/tape/tape0_d1  if archive is not specified.	If the name of
	      the file is - (dash), salvage writes to standard output.	Speci‐
	      fies  the	 type  of  messages directed to stdout.	 If you do not
	      specify this option, the default is to direct  only  error  mes‐
	      sages  to stdout.	 If you specify n to be 1, both errors and the
	      names of partially-recovered files are directed to  stdout.   If
	      you  specify  n  to  be  2, error messages and the status of all
	      files as they are recovered are directed to  stdout.   Specifies
	      the  block  device  special file names of volumes in the domain,
	      for example, /dev/disk/dsk3c.  The utility attempts  to  recover
	      files only from the volumes you specify.

	      If you do not specify the -V option, you must specify the domain
	      operand so that the utility can obtain the special file names of
	      the volumes in the domain from the /etc/fdmns directory.

	      Do  not  use this option with the domain operand.	 If you do, an
	      error message is displayed and the utility exits	with  an  exit
	      value  of 2.  Specifies that partially-recoverable files are not
	      to be recovered. If you do not use this option, partially-recov‐
	      erable files are recovered.

	      Do  not  use  the	 -x option with the -p option.	If you do, the
	      utility displays an error message and exits with an  exit	 value
	      of 2.

OPERANDS
       Specifies the name of an existing AdvFS file domain from which filesets
       are to be recovered.  Use this parameter when you want the  utility  to
       obtain  volume  information  from the /etc/fdmns directory.  The volume
       information used by the utility consists of  the	 device	 special  file
       names of the AdvFS volumes in the file domain.  When the domain operand
       is specified  without  optional	arguments,  the	 utility  attempts  to
       recover the files in all filesets in the domain.

	      Do  not  use  this  operand  when you want to use the -V special
	      option to specify device special file names  of  AdvFS  volumes.
	      If  you do, the utility displays an error message and exits with
	      an exit value of 2.  Specifies the  name	of  a  fileset	to  be
	      recovered from a domain or a volume.

	      Specify  path  to	 indicate the path of a directory or file in a
	      fileset.	When you specify a path that is a directory, the util‐
	      ity  attempts  to recover only the files in that directory tree,
	      starting at the specified directory. When	 you  specify  a  path
	      that is a file, the utility attempts to recover only that file.

	      Specify path relative to the mount point of the fileset.

DESCRIPTION
       The  salvage  utility  helps  you recover file data after an AdvFS file
       domain has become unmountable due to  some  type	 of  data  corruption.
       Errors  that  could  cause data corruption of a file domain include I/O
       errors in file system metadata, the accidental removal of a volume,  or
       any I/O error that produces a panic.

       Use  the	 salvage  utility  as  a  last resort. You should first repair
       domain structures by using the verify utility.  If that	repair	method
       is  unsatisfactory,  attempt to recover fileset data from backup media.
       Only if both methods are unsatisfactory should you employ  the  salvage
       utility.

   Space Needed By salvage
       As the utility recovers files, it writes temporary files to a subdirec‐
       tory of the recovery directory, and uses these files to process the on-
       disk  structures	 it  is	 reading.  The utility deletes these temporary
       files when it exits.

   Format of Log File Messages
       The following are log file message formats: The general format is:

       fileset/file : uid : gid : size : bytes recovered : type	 :  file  sta‐
       tus...

       For example, for a regular file:

       user_fs/data.file : 3500 : 15 : 56116 : 56116 : REG : file successfully
       \      recovered

       For example, for a directory:

       user_fs/data/ : 3500 : 15 : 8192 : 8192 : DIR  :	 file  successfully  \
       recovered

       For a file and a directory, when its name cannot be found:

       user_fs/data.file.lost+found/tag_12345  :  0 : 10 : 24576 : 24576 : REG
       :\      filename not recovered

       user_fs/data/lost+found/tag_54321/ : 0 : 10 : 8192  :  8192  :  DIR  :\
	    directory not recovered

       For a file, when the ending fragment cannot be found:

       user_fs/data.file  : 3500: 15 : 56116 : 55092 : REG : file truncated by
       \
	    1024 bytes

       For a file, when not all the file's pages can be recovered:

       user_fs/data.file : 3500 : 15 : 1646592 :  24576	 :  REG	 :  Incomplete
       file,\
		 hole between bytes MMMMM and NNNNN, bytes XXXXX and YYYYY

       For  a file, when it has an entry in a directory but cannot be found on
       disk:

       user_fs/data.file : 3500 : 15 : 56116 : 0 : REG : Unable to locate file

NOTES
       The salvage utility opens and reads block devices  directly  and	 could
       present	a  security  issue if it recovers data remaining from previous
       AdvFS file domains while attempting to recover data from current	 AdvFS
       file domains.

       The  salvage  utility  can be run in single-user mode, without mounting
       other file systems.  The salvage utility is  available  from  the  UNIX
       Shell  option when you are booting from the Tru64 UNIX Operating System
       Volume 1 CD-ROM.

       The salvage utility can find metadata on disk that  appears  valid  but
       might  not be:  in most cases, the utility can determine when this sus‐
       pect metadata should be used or ignored.	 One of	 these	problems  that
       the utility cannot detect is the situation when the metadata contains a
       tag number that could be valid on a very large fileset, but is  invalid
       for  common filesets.  In this case, the utility creates a partial file
       in the lost+found directory.

       The salvage utility has a builtin soft limit on	the  number  of	 valid
       tags  in	 a fileset:  10,000,000 tags.  If an application should exceed
       this soft limit, the user is prompted about increasing the  limit.  For
       example:	 salvage:   Current soft-limit on tag array 10000000; increase
       size \	   to 538977250?

       If you answer y to the prompt, the soft limit is increased to  the  new
       value.  If you answer n to the prompt, the hard limit is set to the new
       value and you will not be prompted for tabs larger than this new limit.

       If increasing this limit causes a memory error, rerun the utility with‐
       out increasing the limit.

RESTRICTIONS
       You must be the root user to use the salvage utility.

       Before  using  the  salvage utility, all filesets in the domain you are
       trying to recover probably have been already unmounted.	 However,  use
       the umount(8) command to ensure that the filesets are unmounted. If all
       filesets are not unmounted, the utility displays an error message exits
       with an exit value of 2.

EXIT STATUS
       The  exit  values for the salvage utility are: Success Partial recovery
       Failure, including command line syntax errors

ERRORS
       The salvage utility error diagnostics cause the utility to exit with an
       exit code of 2.	The diagnostics are: salvage: Error - Out of memory

	      Explanation:

	      The utility does not have enough memory salvage: Error - No such
	      file or directory

	      Explanation:

	      The file or directory you specified could not be	found  on  the
	      device specified.	 salvage: Error - I/O error

	      Explanation:

	      An  I/O  error  occurred during the salvage operation.  salvage:
	      Error - No space left in recovery directory

	      Explanation:

	      The directory to which the recovered files are written is full.

EXAMPLES
       The following example  shows  a	salvage	 command  that	uses  all  the
       defaults	 to  recover  all  files  from	the  AdvFS  file  domain named
       user_domain.  Other results include: A log file	named  salvage.log.pid
       is written to the fixit directory The files that are recovered from the
       user_domain are also written to the fixit directory  Partially-recover‐
       able  files are recovered.  These files are written to the fixit direc‐
       tory.  The extension is not appended to the name of each	 file.	 #  cd
       /fixit  #  /sbin/advfs/salvage  -p 9611200000 user_domain The following
       example shows a salvage command that uses the -d option to recover  all
       the  file  in  the domain user_domain that have been changed after that
       date.  # cd /fixit # /sbin/advfs/salvage -d 9611200000 user_domain  The
       following  example  shows  a  salvage  command  that  recovers the file
       data.file, whether or not it is only partially  recoverable,  from  the
       fileset user_fileset on the volume mounted as /dev/disk/dsk3c.

	      The  data.file  file  is	written	 to the recovery directory and
	      logged in the log file only if it was partially recovered.  # cd
	      /fixit   #  /sbin/advfs/salvage  -V  /dev/disk/dsk3c  user_file‐
	      set/data.file The following example shows a salvage command that
	      recovers	the  file  data.file, only if it is fully-recoverable,
	      from the fileset user_fileset on the domain user_domain.

	      The data.file file, if it is not recovered, is logged in the log
	      file.  Otherwise, it is written to the recovery directory.  # cd
	      /fixit   #   /sbin/advfs/salvage	 -x   user_domain   user_file‐
	      set/data.file

FILES
       Contains	 AdvFS	file domain names and devices Contains static informa‐
       tion about file systems and filesets

SEE ALSO
       Commands:  umount(8), verify(8), vrestore(8)

       Files:  fdmns(4)

								    salvage(8)
[top]

List of man pages available for DigitalUNIX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net