HPlogo New Features of MPE/iX: Using the Hierarchical File System: 300 MPE/iX Computer Systems > Chapter 8 Backing Up and Recovering MPE/iX

Backing Up MPE/iX Files

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Glossary

 » Index

Valid file names that use MPE syntax are also valid in HFS syntax; however, the converse is not necessarily true. For example, the MPE file name STORE.PUB.SYS maps to /SYS/PUB/STORE in the HFS syntax; but the file name /tmp/store is not valid in the MPE name space (because HFS syntax is case sensitive but MPE syntax is not).

File name mapping for full backups

To ensure that all files on a system get backed up, certain MPE syntax names get mapped to HFS syntax. Anytime the filename, group, and/or account part of an MPE syntax name is equal to @, the name will be mapped to an equivilent HFS name. This mapping is only done for inclusion file sets, it is not done for exclusion (negative) file sets.

Specifying MPE/iX files

You can store or restore file sets that use MPE or HFS syntax by using the STORE or RESTORE commands, respectively. You can also use an indirect file. Following are the rules for specifying MPE/iX file sets in the STORE and RESTORE commands:

  • Separate multiple file sets with a ",".

  • Specify exclusions from a file set by including a "-" symbol before the file set (negative file set).

  • Since "-" is a valid HFS file name character, make sure that it is preceded by a blank so that it is recognized as a negative file set symbol in an HFS syntax file set.

You can use wildcard characters to specify the MPE/iX file set that is to be stored. After the file set is syntactically verified, it is expanded into the list of files to be stored.

Use the STORE and RESTORE syntax to specify the following HFS file sets:

  • all files directly under a specified directory (horizontal cut)

  • all files and directories at all levels below and including a specified directory (a recursive scan)

  • hierarchical directory structure (the entire file system)

The pathname component at every level in the file set pathname expands to a horizontal cut (matching the wildcard) at that level. In addition, if the file set has a trailing "/", then all of the directory matches at the last component of the specified set are scanned recursively.

STORE and RESTORE also provide two overriding options: TREE and NOTREE. These options override the trailing slash on the file set. The TREE option forces every file set to be scanned recursively from the specified level, including any levels beneath it; the NOTREE option forces every file set to be scanned for a horizontal cut only.

You can also exclude certain files from the file set by preceding the name with a minus sign. An unlimited number of exclusion file sets may be specified.

Table 8-1 shows examples of valid MPE/iX file sets for STORE and RESTORE.

Table 8-1 Example File Sets for STORE/RESTORE

File SetContents
?@.@.@All files and directories directly under MPE groups whose names conform to MPE syntax
./file1file1 in the current working directory
./@ or @All files and directories directly below the current working directory
?@All files and directories in the current working directory whose names conform to MPE syntax
./[aA]@All files or directories in the current working directory whose names begin with "a" or "A"
./dir1/@All files or directories located in the subdirectory dir1 in the current working directory
/SYS/PUB/@ or @.PUB.SYSAll files or directories in directory /SYS/PUB
/@/@/@All files or directories three levels below the root directory

./dir1/a@,

./dir1/@a

From the current working directory, all files and directories in dir1 beginning or ending with "a"

./dir1/@ -

./dir1/a@

From the current working directory, all files and directories in dir1 except those beginning with "a"

/@/@/@ -

/SYS/PUB/@

All files and directories exactly three levels beneath the root directory except the files and directories in /SYS/PUB
/ or @.@.@All files and directories on the system (beginning with the root directory and moving down through the entire file system)
./dir1/From the current working directory, all files and directories beneath and including dir1
./dir1/a@, ./dir2/From the current working directory, all files and directories beginning with "a" directly beneath dir1; and all files and directories at all levels beneath and including dir2 ofthe current working directory

./d1/ -

./d1/dir2/@

All files and directories at all levels beneath and including d1, except for those files and directories that are in subdirectory dir2

./dir@/ -

./dir1/dir2/

From the current working directory, all files and directories beneath directories matching dir@ (such as dira, dirb, etc.), except the files and directories under subdirectory dir1/dir2 (or subdirectory dir2 of dir1 of the current working directory)
/ - @.@.@All files and directories that are outside of MPE syntax

 

Backing up the file system

To back up the entire hierarchical file system including all MPE-named files and HFS-named files, you can still use the following command:

   :STORE @.@.@

You can also use:

   :STORE /

This is the HFS syntax to perform the same task.

It is recommended that STORE / should be used in place of the command STORE @.@.@ when performing a full system backup, although STORE @.@.@ will be mapped to include all files on the system.

Additional backup examples

The following example backs up all of the files and directories in the account called MKTG and sends a listing of the backed up files and directories to LP. In the example, including the slash after the account name (as in /MKTG/) is the same as specifying the TREE option with the STORE command. It causes the STORE command to store all files and HFS directories in the MKTG account and its subtree.

    FILE TAPEDEV; DEV=TAPE

    STORE /MKTG/; *TAPEDEV; SHOW=OFFLINE

The following example produces a complete system image on the backup media and sends a listing of the backed up files to LP.

    FILE TAPEDEV; DEV=TAPE

    STORE /; *TAPEDEV; SHOW=OFFLINE; DIRECTORY

The file set "/" specifies the root directory, which is scanned recursively. This backs up all files on the system.

The DIRECTORY option saves the entire hierarchical directory structure along with the MPE/iX account and group information and UID/GID data. The directory information is used to recreate the hierarchical directory structure when these files and directories are regenerated using the RESTORE command.

The following example performs the same complete system image on the backup media:

    FILE TAPEDEV; DEV=TAPE

    STORE @.@.@; *TAPEDEV; SHOW=OFFLINE; DIRECTORY

The DATE>= option can be used to obtain an incremental backup of the files changed or modified since some_date as illustrated in the next example.

    FILE TAPEDEV; DEV=TAPE

    STORE /; *TAPEDEV; SHOW=OFFLINE; DIRECTORY; DATE>=some_date

Storing old files

The DATE<= and PURGE options can be used to archive files not accessed since some_date, as shown in the following example.

    FILE TAPEDEV; DEV=TAPE

    STORE /; *TAPEDEV; SHOW=OFFLINE; DATE<= some_date;PURGE

The PURGE option removes only the files that match the date and file specifications and does not remove the directory nodes.

What gets stored

For a horizontal cut (all files in a directory) or for the recursive scan (all files at all levels below the specified directory), the files and directories are stored together. However, if the DIRECTORY option is used with the STORE command, the directories in the specified file set are stored separately from the files.

The directories are collected and stored at the start of the media. This portion of the tape is used to regenerate the hierarchical directory structure as required at RESTORE time. (The root/account/group and user information is stored in a file to maintain backwards compatibility.)

Note that you must have SM or OP capability to use the DIRECTORY option.

NOTE: The default file set is "@". With the STORE command, if the DIRECTORY option is specified, the default file set is empty.

An unqualified set such as "@" or "a@" is always expanded relative to the current working directory.

Storing of Symbolic Links

As of Release 5.0, MPE/iX supports symbolic links. STORE treats symbolic links in the following manner:

  1. When the symbolic link is the final component of a pathname, the link will be stored and not the file to which the link points.

       :NEWLINK /ACC/SLINK,/usr/jdoe/file
    
       :STORE /ACC/SLINK;tape;show
    

    If you perform these commands, the symbolic link /ACC/SLINK is stored and the file /usr/jdoe/file is not stored.

  2. When the symbolic link is an intermediate component of a pathname, the link will be traversed and files will be stored using absolute pathname.

       :NEWDIR /usr/jdoe/dir
    
       :NEWLINK /DENIS,/usr/jdoe/dir
    
       :BUILD /DENIS/file1
    
       :BUILD /DENIS/file2
    
       :STORE /DENIS/@;*tape;show
    

    The files file1 and file2 are stored and identified with the following names:

       /usr/jdoe/dir/file1
    
       /usr/jdoe/dir/file2
    

    They can only be restored using these pathnames.

  3. Intermediate symbolic links only match literally. The symbolic link is not expanded before checking for name matches.

       :NEWDIR /usr/jdoe/dir
    
       :NEWLINK /DENIS,/usr/jdoe/dir
    
       :NEWLINK /JAIME,/usr/jdoe/dir
    
       :BUILD /DENIS/file1
    
       :BUILD /DENIS/file2
    
       :BUILD /DENIS/file3
    
       :BUILD /JAIME/file4
    
       :STORE /DENIS/@ -/DENIS/file1 -/usr/jdoe/dir/file2 -/JAIME/file4;*t;show
    

    If you perform the example above, the files /usr/jdoe/dir/file3 and /usr/jdoe/dir/file4 are stored. The files /usr/jdoe/dir/file1 and /usr/jdoe/dir/file2 are not stored. /usr/jdoe/dir/file4 is stored because /DENIS/file4 does not match /JAIME/file4. Therefore, /JAIME/file4 excluded a file not in the store set.

Feedback to webmaster