Renaming Files (RENAME)
When using the RENAME option, an original file refers to the original
disk file, and a target file indicates the final file name on the backup
media.
Renaming a file requires the capabilities necessary to manipulate files
across groups and accounts. Table 6-2 assigns capabilities to the
different levels of file renaming.
Table 6-2. Required Capabilities for RENAME
------------------------------------------------------------------------------
| | | | | |
| Capabilities Required | File | Group | Acct | Creator |
| | | | | |
------------------------------------------------------------------------------
| | | | | |
| File Creator | Yes | Yes | No | No |
| | | | | |
------------------------------------------------------------------------------
| | | | | |
| Account Manager (AM) | Yes | Yes | No | Yes |
| | | | | |
------------------------------------------------------------------------------
| | | | | |
| System Manager (SM) | Yes | Yes | Yes | Yes |
| | | | | |
------------------------------------------------------------------------------
| | | | | |
| System Supervisor (OP) | Yes | Yes | Yes | Yes |
| | | | | |
------------------------------------------------------------------------------
The RENAME option has the following syntax:
STORE file set [=targetname [:creatorname [.creatoraccount]]]
[,file set[=targetname [:creatorname [.creatoraccount]]]]
;*TAPE;RENAME;SHOW
The file set consists of the inclusion file set and all exclusion file
sets. All legal file sets are allowed. The targetname can be any legal
MPE or HFS file name with the following restrictions on wildcards:
1. Each component of the file or path name must either be equal to @
or have no wildcards.
2. An HFS path name which ends in a / can have no wildcards. The
trailing slash is used to designate a directory to place all
files.
Each component of the creator name must either be equal to @ or have no
wildcards. The account part of the creator name may be omitted.
The @ is used to specify that the component in the original file name
should be used for that component of the target file name. When
specifying HFS path names, components will be replaced from the root on
down. However, if the last component of the target path name is an @ the
last component of the original path name will be used. If there is not a
corresponding component for an @ in the original path name the file will
not be stored.
The following tables illustrate sample translations for the target file
names:
STORE a.b.c=...;TAPE;RENAME;SHOW
-------------------------------------------------------------------------------------------
| |
| Original Filename Target Specification Target Filename |
| |
-------------------------------------------------------------------------------------------
| |
| A.B.C x.y.z X.Y.Z |
| |
| A.B.C @.y.z A.Y.Z |
| |
| A.B.C x.@.z X.B.Z |
| |
| A.B.C x.y.@ X.Y.C |
| |
-------------------------------------------------------------------------------------------
STORE /A/B/C=...;TAPE;RENAME;SHOW
-------------------------------------------------------------------------------------------
| |
| Original Filename Target Specification Target Filename |
| |
-------------------------------------------------------------------------------------------
| |
| /A/B/C @.y.z C.Y.Z |
| |
| /A/B/C x.@.z X.B.Z |
| |
| /A/B/C x.y.@ X.Y.A |
| |
-------------------------------------------------------------------------------------------
STORE /a/b/c=...;TAPE;RENAME;SHOW
-------------------------------------------------------------------------------------------
| |
| Original Filename Target Specification Target Filename |
| |
-------------------------------------------------------------------------------------------
| |
| /a/b/c @.y.z /z/y/c |
| |
| /a/b/c x.@.z /z/b/x |
| |
| /a/b/c x.y.@ /a/y/x |
| |
-------------------------------------------------------------------------------------------
STORE /a=/@/x/@/y/@;*TAPE;RENAME;TREE;SHOW
-------------------------------------------------------------------------------------------
| |
| Original Filename Target Specification Target Filename |
| |
-------------------------------------------------------------------------------------------
| |
| /a/ /@/x/@/y/@ NOT STORED: (1) |
| |
| /a/f1 /@/x/@/y/@ NOT STORED: (1) |
| |
| /a/b/ /@/x/@/y/@ NOT STORED: (1) |
| |
| /a/b/f2 /@/x/@/y/@ NOT STORED: (1) |
| |
| /a/b/c/ /@/x/@/y/@ NOT STORED: (1) |
| |
| /a/b/c/f3 /@/x/@/y/@ /a/x/c/y/f3 |
| |
| /a/b/c/d/ /@/x/@/y/@ /a/x/c/y/d/ |
| |
| /a/b/c/d/f4 /@/x/@/y/@ /a/x/c/y/f4 |
| |
| /a/b/c/d/e/ /@/x/@/y/@ /a/x/c/y/e/ |
| |
| /a/b/c/d/e/f5 /@/x/@/y/@ /a/x/c/y/f5 |
| |
| /a/b/c/d/e/f/ /@/x/@/y/@ /a/x/c/y/f/ |
| |
| /a/b/c/d/e/f/f6 /@/x/@/y/@ /a/x/c/y/f6 |
| |
| /a/b/c/d/e/f/g/ /@/x/@/y/@ /a/x/c/y/g/ |
| |
| /a/b/c/d/e/f/g/f7 /@/x/@/y/@ /a/x/c/y/f7 |
| |
-------------------------------------------------------------------------------------------
(1) Source name does not have component for substitution
The following table illustrates sample translations for a target file
directory when the file set specification was not a directory:
STORE /a/b=/w/x/y/z/;*TAPE;RENAME;TREE;SHOW
-------------------------------------------------------------------------------------------
| |
| Original Filename Target Specification Target Filename |
| |
-------------------------------------------------------------------------------------------
| |
| /a/b/ /w/x/y/z/ /w/x/y/z/b/ |
| |
| /a/b/f2 /w/x/y/z/ /w/x/y/z/b/f2 |
| |
| /a/b/c/ /w/x/y/z/ /w/x/y/z/c/ |
| |
| /a/b/c/f3 /w/x/y/z/ /w/x/y/z/c/f3 |
| |
| /a/b/c/d/ /w/x/y/z/ /w/x/y/z/d/ |
| |
| /a/b/c/d/f4 /w/x/y/z/ /w/x/y/z/d/f4 |
| |
| /a/b/c/d/e/ /w/x/y/z/ /w/x/y/z/e/ |
| |
| /a/b/c/d/e/f5 /w/x/y/z/ /w/x/y/z/e/f5 |
| |
| /a/b/c/d/e/f/ /w/x/y/z/ /w/x/y/z/f/ |
| |
| /a/b/c/d/e/f/f6 /w/x/y/z/ /w/x/y/z/f/f6 |
| |
| /a/b/c/d/e/f/g/ /w/x/y/z/ /w/x/y/z/g/ |
| |
| /a/b/c/d/e/f/g/f7 /w/x/y/z/ /w/x/y/z/g/f7 |
| |
-------------------------------------------------------------------------------------------
The following table illustrates sample translations for a target file
directory when the file set specification was a directory:
STORE /a/b/=/w/x/y/z/;*TAPE;RENAME;SHOW
-------------------------------------------------------------------------------------------
| |
| Original Filename Target Specification Target Filename |
| |
-------------------------------------------------------------------------------------------
| |
| /a/b/ /w/x/y/z/ /w/x/y/z/ |
| |
| /a/b/f2 /w/x/y/z/ /w/x/y/z/f2 |
| |
| /a/b/c/ /w/x/y/z/ /w/x/y/z/c/ |
| |
| /a/b/c/f3 /w/x/y/z/ /w/x/y/z/c/f3 |
| |
| /a/b/c/d/ /w/x/y/z/ /w/x/y/z/c/d/ |
| |
| /a/b/c/d/f4 /w/x/y/z/ /w/x/y/z/c/d/f4 |
| |
| /a/b/c/d/e/ /w/x/y/z/ /w/x/y/z/c/d/e/ |
| |
| /a/b/c/d/e/f5 /w/x/y/z/ /w/x/y/z/c/d/e/f5 |
| |
| /a/b/c/d/e/f/ /w/x/y/z/ /w/x/y/z/c/d/e/f/ |
| |
| /a/b/c/d/e/f/f6 /w/x/y/z/ /w/x/y/z/c/d/e/f/f6 |
| |
| /a/b/c/d/e/f/g/ /w/x/y/z/ /w/x/y/z/c/d/e/f/g/ |
| |
| /a/b/c/d/e/f/g/f7 /w/x/y/z/ /w/x/y/z/c/d/e/f/g/f7 |
| |
-------------------------------------------------------------------------------------------
In a similar manner, the wildcard @ is used to specify the use of the
original creator name component in the new creator name. If no creator
is specified, the original creator is kept. This is equivalent to
specifying @.@ in the creator field. If the creator name is specified
without an account part, the account part of the creator name will be
made equal to the account of the new file.
There is an exception to this rule when the new file name does not have a
legal account name in its path name. A directory off of the root node
that has a legal account name will be considered the account for the
creator. This is true whether this directory is an account or not.
Table 6-3 below illustrates the translations for the creator. All
files below in the "sg" group of the "sa" account were created by
"CREATOR.CRACCT."
Table 6-3. Creator File Translations
-------------------------------------------------------------------------------------
| |
| Original Target Specification Target Creator |
| Filename |
| |
-------------------------------------------------------------------------------------
| |
| s1.sg.sa d1.dg.da CREATOR.CRACCT |
| |
| s2.sg.sa d2.dg.da:@.@ CREATOR.CRACCT |
| |
| s3.sg.sa d3.dg.da:user.acct USER.ACCT |
| |
| s4.sg.sa d4.dg.da:user USER.DA |
| |
| s5.sg.sa d5.dg.da:user.@ USER.CRACCT |
| |
| s6.sg.sa d6.dg.da:@.acct CREATOR.ACCT |
| |
| s7.sg.sa d7.dg.da:@ CREATOR.DA |
| |
| s11.sg.sa /d11 CREATOR.CRACCT |
| |
| s18.sg.sa /d18:@.@ CREATOR.CRACCT |
| |
| s12.sg.sa /d12:user.acct USER.ACCT |
| |
| s13.sg.sa /d13:user USER.CRACCT |
| |
| s15.sg.sa /d15:user.@ USER.CRACCT |
| |
| s17.sg.sa /d17:@.acct CREATOR.ACCT |
| |
| s19.sg.sa /d19:@ CREATOR.CRACCT |
| |
| s14.sg.sa /NOTACCT/dir2/d14:user USER.NOTACCT |
| |
| s14.sg.sa /NOTACCT/dir2/d14:user.@ USER.CRACCT |
| |
| s16.sg.sa /NOTACCT/dir2/d16:@ CREATOR.NOTACCT |
| |
-------------------------------------------------------------------------------------
If the SHOW option is specified, only the target names are listed. The
security option of the SHOW option displays the target creator name if
one is specified.
The ACD associated with a file is not changed when the file is renamed.
As with other STORE operations, the ACD is copied unless the NOACD option
is specified. If you need to change the ACD, use the ALTSEC command.
You can specify the same target file information for more than one org
file. However, when two or more files have the same name on a backup
created using the RENAME option, RESTORE will write the second file over
the first file.
The files excluded may only be specified on the original side of the file
set. As with normal exclusion, there is no limit to the number of
excluded file sets. The below example shows an exclusion file
specification:
:STORE @.PUB.SYS -a -b -c -d=@.backup.sys:creator;*t;rename
Lockwords are not allowed on target files, and if specified cause STORE
to abort. The options that are not supported with the RENAME option and
will cause STORE to abort are:
* PURGE
* TRANSPORT
* SPLITVS