Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
Example 7. RESTORE DATASET z/OS DFSMSdss Storage Administration SC23-6868-01 |
|
You can restore individual partitions or data sets that were part of a full volume dump or that were from a data set level dump previously taken by DFSMSdss. You might want to do this to restore those particular partitions that were corrupted. Restoration of data sets from a data set level dump is similar to restoring full volumes. Figure 1 shows an example of the JCL.
Figure 1. Sample JCL for restoring
individual partitions or data sets.
In Figure 1, notice that the keyword REPLACE is specified instead of PURGE. For data set level restores, REPLACE causes DFSMSdss to replace any existing data sets on the volume with the restored versions. If the data set you are restoring exists and you do not specify REPLACE, the restore will fail and you will not obtain the backup version. Also in Figure 1, the INCLUDE statement indicates that DFSMSdss is to restore any data sets that start with LINUX and end with NATIVE (and have anything in-between). The '**' means any number of eight-letter qualifiers. Be careful to use two asterisks (one asterisk has a different meaning). When preparing to restore a partition, do not use fdasd to delete the partition before running DFSMSdss to restore it. When fdasd deletes a partition, it reorders and renames the remaining partitions on the same volume. A subsequent restore can result in the wrong partition being overlaid. To restore a deleted partition or a partition that never existed, use fdasd, which can create a new partition that is exactly the same size and in the same location as the deleted partition. Use the same starting and ending track. fdasd will create the correct names for the data sets. When you restore that data set or partition, the data is placed correctly and you do not lose any partitions. The reason is that the name of the second partition is the same as the restored first partition. For example, if you delete /dev/dasd/xxxx/part1 (known to z/OS® as LINUX.VLNX200.PART0000.NATIVE), fdasd renames the other partitions (fdasd subtracts one from the former name). part2 becomes part1 and part3 becomes part2. The data set names change, too. After fdasd deletes LINUX.VLNX200.PART0000.NATIVE, it renames LINUX.VLNX200.PART0001.NATIVE to LINUX.VLNX200.PART0000.NATIVE. If you then use DFSMSdss to restore the first partition (named LINUX.VLNX200.PART0000.NATIVE), you will lose the second partition. You can also use the RENAMEUNCONDITIONAL keyword to change the
names of the data sets that you are restoring. Figure 2 shows an example of the JCL.
Figure 2. Sample JCL for renaming data
sets to be restored.
If you want to change the data set, change only the volser or
the last character of the partition name (PART000x).
If you change anything else, Linux might
not recognize the partition.
Assume that you have three partitions on a volume in which:
Now suppose that someone with root authority accidentally deletes the programs on Partition 1. As a result, you need to restore the backup versions of those programs, but leave the data partition (Partition 2) alone. You might not have to restore Partition 3 because it is swap space. Figure 3 shows an example of the JCL
you might use to restore only the first partition, LINUX.VLNX200.PART0000.NATIVE.
Figure 3. Sample JCL for restoring only
one partition of a volume.
|
Copyright IBM Corporation 1990, 2014
|