frecover(1M)
NAME
frecover − selectively recover files
SYNOPSIS
/etc/frecover −r [−hosvyAFOX] [−c config] [−f device] [−S skip]
/etc/frecover −R path [−f device]
/etc/frecover −x [−hosvyAFOX] [−c config] [−e path] [−f device] [−g graph] [−i path] [−S skip]
/etc/frecover −I path [−vy] [−f device] [−c config]
/etc/frecover −V path [−vy] [−f device] [−c config]
DESCRIPTION
frecover reads media written by the fbackup(1M) command. Its actions are controlled by the selected function −r, −R, −x, −V, or −I.
The function performed by frecover is specified by one of the following letters:
−r The backup media is read and the contents are loaded into the directories from which they were backed up. This option should only be used to recover a complete backup onto a clear directory or to recover an incremental backup after a full level-zero recovery (see fbackup(1M)). This is the default behavior.
−x The files identified by the −i, −e and −g options (see below) are extracted/not-extracted from the backup media. If a file to be extracted matches a directory whose contents have been written to the backup media, and the −h option is not specified, the directory is recursively extracted. The owner, modification time, and access control list (including optional entries, unless the −A option is specified) are recovered. If no file argument is given (including an empty graph file), all files on the backup media are extracted, unless the −h option is specified.
−I path The index on the current volume is extracted from the backup media and is written to path.
−V path The volume header on the current volume is extracted from the backup media and is written to path. The following fields from the header are extracted in the format label:value with one pair per line.
Magic Field On a valid fbackup media it contains the value FBACKUP LABEL.
Machine Identification This field contains the result of uname −m.
System Identification This field contains the result of uname −s.
Release Identification This field contains the result of uname −r.
Node Identification This field contains the result of uname −n.
User Identification This field contains the result of cuserid(3S).
Record Size This field contains the maximum length in bytes of a data record.
Time This field contains the time fbackup was started.
Media Use This field contains the number of times the media has been used for backup.
Volume Number This field contains a # character followed by 3 digits, and identifies the current volume in the backup.
Checkpoint Frequency This field contains the frequency of backup data record checkpointing.
Index Size This field contains the size of the index.
Backup Identification Tag This field is composed of 2 items the process id (pid) and the start time of that process.
Language This field contains the language used to make the backup.
−R path An interrupted recovery can be continued using this option. frecover uses the information in file path to continue the recovery from where it was interrupted. The only command line option used by frecover with this option is −f. The values in path override all other options to frecover.
The following characters can be used in addition to the letter that selects the desired function:
−c config config specifies the name of a configuration file to be used to alter the behavior of frecover. The configuration file allows the user to specify the action to be taken on all errors, the maximum number of attempts at resynchronizing on media errors (−S option), and changing media volumes. Each entry of a configuration file consists of an action identifier followed by a separator followed by the specified action. Valid action identifiers are error, chgvol, and sync. Separators can be either tabs or spaces. In the following sample configuration file, each time an error is encountered, the script /usr/adm/fbackupfiles/frecovererror is executed. Each time the backup media is to be changed, the script /usr/adm/fbackupfiles/frecoverchgvol is executed. The maximum number of resynchronization attempts is five.
error /usr/adm/fbackupfiles/frecovererror
chgvol /usr/adm/fbackupfiles/frecoverchgvol
sync 5
−e path path is interpreted as a graph to be excluded from the recovery. There is no limit on how many times the −e option can be specified.
−f device device identifies the backup device to be used instead of the default /dev/rmt/0m. If device is −, frecover reads from standard input. Thus fbackup(1M) and frecover can be used in a pipeline to backup and recover a file system as follows:
fbackup −i /usr −f − │ (cd /mnt; frecover −Xrf −)
If more than one output file is specified, frecover uses each one successively and then repeats in a cyclical pattern. Patterns may be used in the device name in a way similar to file name expansion as done by sh(1). The expansion of the pattern results in all matching names being in the list of devices used. A device on the remote machine can be specified in the form machine:device. frecover creates a server, /etc/rmt, on the remote machine to access the tape device. The pattern matching capability does not apply to remote devices. Only half-inch 9-track magnetic tapes or DAT tapes can be remote devices. The fast search capability is not used when accessing remote DAT devices.
−g graph graph defines a graph file. Graph files are text files and contain the list of file names (graphs) to be recovered or skipped. Files are recovered using the −i option; thus if the user wants to recover all of /usr, the graph file contains one record:
i /usr
It is also possible to skip files by using the −e option. For instance, if a user wants to recover all of /usr except for the subgraph /usr/lib, the graph file contains two records:
i /usr
e /usr/lib
If the graph file is missing, frecover exits with an error message. An empty graph file results in recovering all files on the media.
−h Extract the actual directory, rather than the files that it references. This prevents hierarchical restoration of complete subtrees from the backup media.
−i path path is interpreted as a graph to be included in the recovery. There is no limit on how many times the −i option can be specified.
−o Recover the file from the backup media irrespective of age. Normally frecover does not overwrite an existing file with an older version of the file.
−s Attempt to optimize disk usage by not writing null blocks of data to sparse files.
−v Normally frecover works silently. The −v (verbose) option causes it to display the file type and name of each file it treats.
−y Automatically answer yes to any inquiries.
−A Do not recover any optional entries in access control lists (ACLs). Normally, all access control information, including optional ACL entries, is recovered. This option drops any optional entries and sets the permissions of the recovered file to the permissions of the backed up file. Use this option when recovering files backed up from a system with ACLs on a system for which ACLs are not desired (see acl(5)).
−F Recover files without recovering leading directories. For example, this option would be used if a user wants to recover /usr/bin/vi, /bin/sh, and /etc/passwd to a local directory without creating each of the graph structures.
−O Use the effective uid and gid for the owner and group of the recovered file instead of the values on the backup media.
−S skip frecover does not ask whether it should abort the recovery if it gets a media error. It tries to skip the bad block(s) and continue. Residual or lost data is written to the file named by skip. The user can then edit this file and recover otherwise irretrievable data.
−X Recover files relative to the current working directory. Normally frecover recovers files to their absolute path name.
EXTERNAL INFLUENCES
Environment Variables
LC_COLLATE determines the order in which frecover expects files to be stored in the backup device and the order in which file names are output by the −I option.
LANG determines the language in which messages are displayed.
If LC_COLLATE is not specified in the environment or is set to the empty string, the value of LANG is used as a default for each unspecified or empty variable. If LANG is not specified or is set to the empty string, a default of "C" (see lang(5)) is used instead of LANG. If any internationalization variable contains an invalid setting, frecover behaves as if all internationalization variables are set to "C". See environ(5).
WARNINGS
For incremental backups created prior to installing HP-UX Release 8.0, it is possible for the preceding directories to a changed file to not be on the media. This can happen, for example, if the directories did not change since the last full backup. In order to recover the files on the tape, the full pathname must be specified. An easy way to accomplish this for many files is to extract the index from the last media and use it to make a graph file.
Use of frecover does not require special privileges. However, if a user does not have access permission to a given file, the file is not recovered.
Network special files are obsolete. Therefore, frecover cannot restore these files. A warning message is issued if an attempt is made to recover a network special file, and the file is skipped.
AUTHOR
frecover was developed by HP.
FILES
/dev/rmt/0m Default backup device.
SEE ALSO
cpio(1M), dump(1M), fbackup(1M), restore(1M), rmt(1M), tcio(1M), cdf(4), acl(5).
Hewlett-Packard Company — HP-UX Release 8.05: June 1991