Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Performing recovery for the bs2fs_lost+found area

&pagelevel(3)&pagelevel

This command offers the following functions:

  • Listing the files in the bs2fs_lost+found area

  • Outputting the number of these files

  • Generating a shell script which copies the files from the bs2fs_lost+found area to BS2000 and/or deletes them from this area

  • Direct copying and/or deletion of files in the bs2fs_lost+found area, either in interactive mode with an inquiry or in an automatic mode with default settings.

Syntax


Format 1:

bs2fs_recover [-l] [-m level]
              [-a after] [-b before] [-u user|*ALL] [file selection]

Format 2:
bs2fs_recover {-g|-x} [-d] [-w] [-c] [-f n|y] [-p prefix] [-s suufix]
              [-a after] [-b before] [-u user|*ALL] [file selection]
Main options

The main options define which function is to be executed. Only one main option may be specified.

No main option specified

All selected files are listed, which corresponds to main option -l.

-l

The number or a list of selected files is output to the default output. The -m option defines the scope of the output.

-g

A shell script is generated which performs the actions specified with the -d und -w options when it is executed. The generated shell script is output to the default output.

-x

The actions specified with the -d und -w options are performed immediately. With these actions an output is by default only made in the event of an error. If you want to see the progress of processing, you should specify the -v option at least once so that the file name concerned is listed before the actions for this file are executed.

Additional options

The additional options are used to modify the action concerned or for file selection.

-m level

This option controls the scope of the output when the -l option is specified. If the -m option is not specified, -m 1 is assumed.

It is obligatory to specify level. The following options can be specified:

0

The number of files found is output to the default output in a line with the format "Number file(s)". in this case the end status also supplies information on whether at least one file was found (end status = 0) or not (end status = 1). This provides a simple way of checking whether the bs2fs_lost+found area contains any of your own files.

1

A list of files is output to the default output. This contains the date and time of the last modification, the file size and the name of the associated BS2000 file or the complete specification of the corresponding library member (library name(member name,type,version)). The name is prefixed by the serial number of the bs2fs mount, separated by a "/".

2

Output as for -m 1 with the following additional information:

File processing mode of the bs2fs mount T, TB, B (for ftyp text, textbin or binary) and absolute ufs file name in the bs2fs container (bs2fs_lost+found area).

3

Output as for -m 2 with the following additional information:

Access method (PAM, SAM, ISAM or PLAM), block format, block length, record format and record length.

If certain information, such as record foramt, does not exist for PAM files, "-" is output instead. You can use this information to write your own scripts for copying and deleting the files.

Example of an output with -m 3:

2012-03-20 09:39:06 8 3/:90GB:$TSOS.TSOSDAT T /grossercont/bs2fs_lost+found/TSOS/:90GB:3:TD01SV00000:tsosdat SAM DATA (STD,1) V -

-d

In conjunction with the main options -g and -x: The selected files are deleted from the bs2fs container area bs2fs_lost+found. This option can also be used together with the -w option.

-w

In conjunction with the main options -g and -x: The selected files are copied to BS2000. This option can also be used together with the -d option.

-c

Suppresses the use of the catalog ID and user ID employed to date when copying to BS2000 (-w option). This option can be used (if necessary together with the -p option) to perform backup under a different catalog ID/user ID from the one specified in bs2fs-mount.

-f n|y

Determines whether existing BS2000 files and LMS members are overwritten when copying to BS2000 (-w option).

Depending on the main option, the -f option has the following effects:

Main option -g (Generating a shell script)

When the -w option is specified, the OV variable is always set in the script. This controls the behavior when copying to BS2000 while the generated script is executed.

When the -f option is not specified or -f n is specified, the OV variable is assigned the value "NR", as a result of which BS2000 files are not overwritten when copying takes place. When -f y (OV="Y") is specified, they are overwritten.

When the -w and -d options are specified simultaneously, files are deleted only if the preceding copy operation was successful either because the file did not yet exist in BS2000 or because it was possible to overwrite it successfully.

If the script is generated only for the purpose of deletion (-d option), the OV variable is not set. The files in the Lost+Found area are then deleted without an inquiry irrespective of the -f option.

Main option -x (Immediate deletion or copying)

The use of the -f option decides whether an inquiry should be made before each action takes place (interactive mode) or not (automatic mode).

When the -f option is not specified, the following inquiries are made:

  1. Should the file be copied (with the -w option)

  2. Should the file be overwritten (with the -w option if the target file already exists)

  3. Should the file be deleted from the Lost+Found area (with the -d option).

If one of these inquiries is answered with "no", no further inquiries or actions take place for the same file. In particular, a file is not deleted if copying or overwriting was rejected beforehand.

When the -f y or -f n option is specified, no inquiries are made either when copying (-w) or when deleting (-d). When copying, depending on the -f option existing files are either overwritten (-f y) or not (-f n).

-p prefix

Specifies a string with which the BS2000 file name is prefixed when copying to BS2000 (-w option). If prefix contains a catalog ID and/or a user ID, the -c option must also be specified to permit a valid BS2000 file name to be created.

-s suffix

Specifies a string which is appended to the BS2000 file name when copying to
BS2000 (-w option).

-a after

The file selection is restricted to files which were last modified after the time specified with after .

The time is specified as follows: [[YY]yy]MMDDhhmm[.SS]

[YY]yy

Year (two or four characters)
A two-character year specification is complemented as following: yy > 68 means 19yy, yy <= 68 means 20yy.
If no year is specified, the current year is assumed.

MM

Month, two characters (01 through 12)

DD

Day, two characters (01 through 31)

hh

Hour, two characters (00 through 23)

mm

Minute, two characters (00 through 59)

SS

Second, two characters (00 through 61)
The values 60 and 61 are provided for leap seconds.
If second is not specified, 0 is assumed.

-b before

The file selection is restricted to files which were last modified before the time specified with before. The format of the time specification is described under the -a option. 

-u user

The file selection is restricted to the files of the specified user ID. The entry for the user ID is not case-sensitive. As a rule, because of the default attributes of the subdirectories in the Lost+Found area (drwx --- ---) owners of nonprivileged IDs can only view and edit their own files.

-u user not specified:

The BS2000 user ID of the caller is used.

-u *ALL (not case-sensitive):

All BS2000 IDs are processed for which files are contained in the Lost+Found area. As a rule this specification is only relevant for the system administration TSOS ID) as only the system administration has the necessary rights to copy and delete files in foreign IDs.

-v

Additional information on the actions of the tool is output. This option can also be specified more than once (up to three times) in order to increase the degree of detail of the information.

file selection

file selection is used to control the selection of the files located in the Lost+Found area (in addition to the selection with the -u option).

Sample printouts can be used like those which are offered by the shell for creating file names. These printouts are then used for the BS2000 file names and LMS member specifications, as the tool outputs them when the -l option is used.

Example:

In the following output with -l -m1 the file name printed in bold is relevant for thesample printout.

2012-03-20 09:39:06 8 3/:90GB:$TSOS.TSOSDAT

In this case the complete file name (without sample printout) would also have to include the prefix 3/.

file selection not specified:

All existing files of the calling user.