The files and job variables to be restored can typically be fetched from any save version managed in the archive. This is useful because RESTORE-FILES normally refers to specific files or job variables identified via FILE-NAMES, PATH-NAMES or JV-NAMES. All save versions are searched for the specified files/job variables. By default they are taken from the most recent save version that contains them.
As an alternative, the search can be restricted to the most recently created save version by specifying SELECT-SAVE-VERSIONS=*LATEST(...). In this case the files and job variables which were marked as “cataloged-not-saved” (CNS) can be restored as follows:
either from the latest save version created, by specifying SELECT-SAVE-VERSIONS=*LATEST(CREATED-AFTER=*EARLIEST-DATE) or
from the latest save version created after a given date, by specifying SELECT-SAVE-VERSIONS=*LATEST(CREATED-AFTER=<date>).
The following should be taken into account when selecting save versions for restoring Net-Storage files: When a save version which is noted as Cataloged-Only (CATL) and is more recent than the last save version with a full backup (FULL) is selected, no Net-Storage files are restored. In this case a range of save versions should be selected which does not contain the CATL version and the restore operation should be repeated.
Restoring catalog entries of BS2000 Net-Storage files:
This section refers only to Net-Storage files of the type BS2000 file. It is not possible only to restore the catalog entries of Net-Storage files of the type node file.
This section refers only to Net-Storage files originating from NETSTOR volumes. It is not possible to restore catalog entries of Net-Storage files originally residing on NETVOL volumes.
The options for selecting save versions also apply for restoring the catalog entry of a BS2000 Net-Storage file. The most recent save version containing the catalog entry only (save type CATL) is selected first. If a save version with CATL exists or if the save version with CATL does not contain the most recent version of the file, the catalog entry of the Net-Storage file can also be restored from the most recent save version which also contains data (save type FULL or PART).
Whether a save version which only contains the catalog entry or the catalog entry and data is used for restoring the catalog entry of a Net-Storage file is determined according to the following rule:
The selection of the save versions contains both save types CATL and FULL.
The selection of the save versions contains both save types CATL and FULL
If the version and CFID of the file are the same, the catalog entry is restored from the save version with CATL.
If the version and CFID of the file are different and the most recent version is of the type FULL, the catalog entry is restored from this save version with FULL.
If the selection contains save versions with CNS, the catalog entry from the most recent save version which contains the most recent version of the file (either CATL or FULL) is restored.
If the selection contains no save version with CATL but does contain one with FULL, the catalog entry is restored from this save version with FULL.
In some cases, several save versions can be created on the same day. The term “latest save version” is therefore extended to mean a number of save versions which were all created on the same day (specification: SELECT-SAVE-VERSIONS=*LATEST(DAY-INTERVAL=*YES). But this operand value is only available for saved files.
Additionally save versions with a specific save version name or save date and time can be selected for restore.
SELECT-SAVE-VERSIONS=*BY-ATTRIBUTES(...)
It is also possible to specify an interval from which to select a save version.
Example of how save versions are restored
The files have been saved as follows by various backup runs:
Save version name
BACKUP01
BACKUP02
BACKUP03
BACKUP04
FILE.1
FULL1
FULL
FULL
CNS
FILE.2
FULL
CNS
FULL
FILE.3
FULL
FULL
FILE.4
FULL
1 = Save type
The result of the various restore runs looks as follows:
//RESTORE-FILES FILE-NAMES=FILE.,-
SELECT-SAVE-VERSIONS=Restored files
From save
version*LATEST
FILE.1
BACKUP03
FILE.3
BACKUP04
*ALL
FILE.1
BACKUP03
FILE.2
BACKUP03
FILE.3
BACKUP04
FILE.4
BACKUP01
*BY-ATTRIBUTES(SAVE-VERSION-NAME=BACKUP02)
FILE.1
BACKUP02
FILE.2
BACKUP01
Example of restoring BS2000 Net-Storage files
The files have been saved as follows by various backup runs:
Save version name
BACKUP01
BACKUP02
BACKUP03
BACKUP04
NET.FILE.1
FULL (1)
CNS (1)
CATL (1)
CNS (1)
NET.FILE.2
CATL (1)
CATL (2)
CNS (2)
-
NET.FILE.3
CATL (1)
FULL (1)
CATL (2)
CNS (2)
NET.FILE.4
FULL (1)
-
CNS (1)
-
Here FULL, CATL, CNS are save types. The different numbers in brackets show different versions (or CFIDs) of the files.The result of the various restore runs looks as follows:
//RESTORE-FILES FILE-NAMES=NET.FILE.,-
NET-STORAGE-FILES=*DATA-AND-CATALOG,-
SELECT-SAVE-VERSIONS=Restored files
From save
version*ALL
NET.FILE.1
BACKUP01
NET.FILE.2
ARC0081
NET.FILE.3
ARC0507
NET.FILE.4
BACKUP01
*LATEST
NET.FILE.1
BACKUP01
NET.FILE.2
-
NET.FILE.3
ARC0507
NET.FILE.4
-
BACKUP03
NET.FILE.1
BACKUP01
NET.FILE.2
ARC0081
NET.FILE.3
ARC0507
NET.FILE.4
BACKUP01
*INTERVAL(AFTER=BACKUP02,BEFORE=BACKUP03)
NET.FILE.1
BACKUP01
NET.FILE.2
ARC0081
NET.FILE.3
ARC0507
NET.FILE.4
BACKUP01
Example of restoring the catalog entries of BS2000 Net-Storage files
The files have been saved as follows by various backup runs:
Save version name
BACKUP01
BACKUP02
BACKUP03
BACKUP04
NET.FILE.1
FULL (1)
CNS (1)
CATL (1)
CNS (1)
NET.FILE.2
CATL (1)
CATL (2)
CNS (2)
-
NET.FILE.3
CATL (1)
FULL (1)
CATL (2)
CNS (2)
NET.FILE.4
FULL (1)
-
CNS (1)
-
Here FULL, CATL, CNS are save types. The different numbers in brackets show different versions (or CFIDs) of the files.The result of the various restore runs looks as follows:
//RESTORE-FILES FILE-NAMES=NET.FILE.,-
NET-STORAGE-FILES=*CATALOG-ONLY,-
SELECT-SAVE-VERSIONS=Restored files
From save
version*ALL
NET.FILE.1
BACKUP03
NET.FILE.2
BACKUP02
NET.FILE.3
BACKUP03
NET.FILE.4
BACKUP01
*LATEST
NET.FILE.1
BACKUP03
NET.FILE.2
-
NET.FILE.3
BACKUP03
NET.FILE.4
-
BACKUP02
NET.FILE.1
BACKUP01
BACKUP02
NET.FILE.2
BACKUP02
BACKUP02
NET.FILE.3
BACKUP01
BACKUP02
NET.FILE.4
-
*INTERVAL(AFTER=BACKUP01,BEFORE=BACKUP02)
NET.FILE.1
BACKUP01
NET.FILE.2
BACKUP02
NET.FILE.3
BACKUP02
NET.FILE.4
BACKUP01
//RESTORE-FILES FILE-NAMES=NET.FILE.,-
NET-STORAGE-FILES=*CATALOG-ONLY,-
SELECT-SAVE-VERSIONS=Restored files
From save
version*ALL
NET.FILE.1
BACKUP03
NET.FILE.2
BACKUP02
NET.FILE.3
BACKUP03
NET.FILE.4
BACKUP01
*LATEST
NET.FILE.1
BACKUP03
NET.FILE.2
-
NET.FILE.3
BACKUP03
NET.FILE.4
-
BACKUP02
NET.FILE.1
BACKUP01
NET.FILE.2
BACKUP02
NET.FILE.3
BACKUP01
NET.FILE.4
-
*INTERVAL(AFTER=BACKUP01,BEFORE=BACKUP02)
NET.FILE.1
BACKUP01
NET.FILE.2
BACKUP02
NET.FILE.3
BACKUP02
NET.FILE.4
BACKUP01