DEFINE SUBRULE (Define an exception to a replication storage rule)

Use this command to define an exception to a storage rule for replicating data. The exception applies only to the node and filespace pairs that are specified by the subrule.

Privilege class

To issue this command, you must have system privilege.

Syntax

Read syntax diagramSkip visual syntax diagram DEFine SUBRule parent_rule_name subrule_name ,node_namenode_group_nameACTiontype=REPLicateNOREPLicatingFIlespace=*FIlespace=,filespace_namefsidDATAtype=ALlDATAtype=,ALlBACKUPARCHiveSPACEManagedNAMEType=SERVERNAMEType=SERVERUNIcodeFSIDCODEType=BOTHCODEType=NONUNIcodeUNIcodeBOTH

Parameters

parent_rule_name (Required)
Specifies the name of the parent storage rule.
subrule_name (Required)
Specifies the name of the subrule. The name must be unique, and the maximum length is 30 characters.
node_name or node_group_name
Specifies the client nodes or client-node groups to which the subrule applies. You can specify a single node name or a comma-delimited list of node names. You can also specify a combination of client node names and client-node group names. To specify multiple client node names or client-node group names, separate the names with commas with no intervening spaces. You can use wildcard characters with client node names but not with client-node group names.
ACTiontype (Required)
Specifies the subrule type. You must specify one of the following values:
REPLicate
Specifies that the storage rule replicates data to a target replication server.
NOREPLicating
Specifies that the storage rule does not replicate data to a target replication server.
Restriction: You cannot specify the same action type for the subrule as defined for its parent storage rule. For example, if the parent rule action type value is defined as REPLICATE, then you must specify the action type as NOREPLICATING when you define the subrule.
FIlespace

Specifies the name of the file space or the filespace identifier (FSID). A name or FSID is optional. If you do not specify a name or an FSID, all the data in all the file spaces for the specified client nodes is eligible for replication.

*
Specifies all file spaces or IDs. This is the default.
filespace_name
Specifies the name of the file space that has data to be replicated. Filespace names are case-sensitive. To determine the correct capitalization for the file space, issue the QUERY FILESPACE command. Separate multiple names with commas with no intervening spaces. When you specify a name, you can use wildcard characters. The specified value can have a maximum of 1024 characters.

A server that has clients with file spaces that are enabled for Unicode might have to convert the file space name. For example, the server might have to convert a name from the server code page to Unicode. For details, see the NAMETYPE parameter. If you do not specify a filespace name, or if you specify a single wildcard character for the name, you can use the CODETYPE parameter to limit the operation to Unicode file spaces or to non-Unicode file spaces.

FSID
Specifies the identifier for the file space to be replicated. To determine the FSID for a file space, issue the QUERY FILESPACE command. Separate multiple FSIDs with commas with no intervening spaces. If you specify an FSID, the value of the NAMETYPE parameter must be FSID. Do not specify both filespace names and FSIDs on the same command.

For clients with file spaces that are in Unicode format, you can enter either a filespace name or an FSID. If you enter a filespace name, the server might have to convert the name. For example, the server might have to convert the name that you enter from the server's code page to Unicode.

When you specify nodes and file spaces, the following rules apply:
  • You can specify a single node and a single filespace, which corresponds to an existing filespace.
  • You can specify a single node and all file spaces by using an asterisk (*) as a wildcard to represent all file spaces, or by entering no value to include all file spaces.
  • You can specify a comma-delimited list of nodes or node groups and no filespace or an asterisk (*) to include all file spaces.
  • You can specify a single node and a filespace name with one or more asterisks in the filespace name. The asterisks can be placed in any part of the name.
  • If you use wildcard characters in a filespace name, you cannot specify wildcard patterns that might result in overlapping node and filespace pairs. Each wildcard pattern can specify one or more node and filespace pairs, but the pairs in one pattern cannot overlap the pairs in another pattern. For example, you cannot specify node NODE1 and filespace ABC* in one subrule, and specify node NODE1 and filespace A* in the same subrule or in a different subrule.
DATAtype
Specifies the type of data to include in the subrule. This parameter is optional. If you do not specify a data type, all backup, archive, and space-managed data is replicated. Separate multiple data types with commas with no intervening spaces. You cannot use wildcard characters. You can specify one or more of the following values:
ALl
The subrule includes all backup, archive, and space-managed data in a file space according to the rule that is assigned to the data type.
BACKUP
The subrule includes active, inactive, and retained backup data in a file space.
ARCHive
The subrule includes only archive data in a file space.
SPACEManaged
The subrule includes only space-managed data in a file space.
NAMEType
Specifies how you want the server to interpret the filespace names that you enter. You can use this parameter when IBM Spectrum® Protect clients have file spaces that are in Unicode format, and are on Windows, NetWare, or Macintosh OS X operating systems.
This parameter is required only if you specify a partly qualified or fully qualified filespace name. The default value is SERVER.
Restriction: When you specify this parameter, the filespace name cannot contain an asterisk.

You can specify one of the following values:

SERVER
The server uses the server's code page to interpret the filespace names. This is the default.
UNIcode
The server converts the filespace name that is entered from the server code page to the UTF-8 code page. The success of the conversion depends on the characters in the name and the server's code page.
Restriction: Conversion can fail if the string includes characters that are not available in the server code page, or if the server cannot access system conversion routines.
FSID
The server interprets the filespace names as their FSIDs.
CODEType
Specifies the type of file spaces to include in the subrule. The default value is BOTH, which specifies that file spaces are included regardless of code page type. Use this parameter only when you enter an asterisk to specify all file spaces. This parameter is optional. You can specify one of the following values:
NONUNIcode
Include file spaces that are not in Unicode format.
UNIcode
Include file spaces that are in Unicode format.
BOTH
Include file spaces regardless of code page type.

Example 1: Define a subrule to exclude records from replication operations

The storage rule PERFORMANCEREVIEWS is defined with the REPLICATE action type and is used to replicate employee performance reviews from a client node to a server. Define an exception to the storage rule by creating a subrule, RETIREES. The subrule ensures that the records of employees who retired are not replicated to the target replication server. The name of the affected node, where current records are stored, is NODE1:

define subrule performancereviews retirees node1 actiontype=noreplicating

Example 2: Define a subrule to include records in replication operations

The storage rule NEWRECORDS is defined with the NOREPLICATING action type, which prevents new employee records from being replicated. Define an exception to the NEWRECORDS storage rule by creating a subrule, BOSTON. The subrule ensures that records of employees in the Boston office are replicated to the target replication server. The name of the affected node, where Boston records are stored, is NODE3:

define subrule newrecords boston node3 actiontype=replicate

Related commands

Table 1. Commands related to DEFINE SUBRULE
Command Description
DEFINE STGRULE (replicating) Defines a storage rule for replicating data.
DELETE SUBRULE Deletes subrules.
QUERY SUBRULE Displays information about subrules.
UPDATE STGRULE (copying) Updates a copy storage rule.
UPDATE SUBRULE (replicating) Updates a subrule that is an exception to a replicating storage rule.