DEFINE STGRULE (Define a storage rule for replicating data)

Use this command to define a storage rule for a target server. The storage rule schedules operations to replicate data from a server. You can define one or more storage rules for a target server.

Privilege class

To issue this command, you must have system privilege.

Syntax

Read syntax diagramSkip visual syntax diagram DEFine STGRULE rule_name target_server ACTiontype = REPLicateNOREPLicating ACTIVE=NoACTIVE=NoYesMAXSEssions=20MAXSEssions=numberDURation=NOLimitDURation=minutesSTARTTime=current_timeSTARTTime=timeTRANSFERMethod=TcpipTRANSFERMethod=TcpipFasp1DESCription=description
Notes:
  • 1 The TRANSFERMETHOD parameter is available only on Linux® x86_64 operating systems.

Parameters

rule_name (Required)
Specifies the name of the storage rule. The name must be unique, and the maximum length is 30 characters.
target_server (Required)
Specifies the name of the server where data is replicated to. You can specify a maximum of one server name for each replication storage rule. Before a replication rule runs, the target server must be defined by using the DEFINE SERVER command.
Restrictions: The following restrictions apply to replication storage rules across an IBM Spectrum® Protect environment. The following restrictions apply across all replication storage rules (regardless of ACTIONTYPE the parameter setting):
  • You can define a maximum of three unique target replication servers across all active and inactive replication storage rules.
  • You can define a maximum of two unique target replication servers across all active replication storage rules.
ACTiontype (Required)
Specifies whether the storage rule replicates data to the target server. The default value is REPLICATE.
REPLicate
Specifies that the storage rule replicates data to the target server.
NOREPLicating
Specifies that the storage rule does not replicate data to the target server.
ACTIVE
Specifies whether the storage rule processing occurs. This parameter is optional. The default is NO. The following values are possible:
No
Specifies that the storage rule is inactive. The storage rule is not processed at the scheduled time.
Yes
Specifies that the storage rule is active. The storage rule is processed at the scheduled time.
MAXSESSions
Specifies the maximum number of data sessions that can send data to a target server. This parameter is optional. The value that you specify can be in the range 1 - 99.

Windows operating systemsAIX operating systemsThe default value is 20.

Linux operating systemsThe default value varies:
  • If TRANSFERMETHOD=TCPIP, the default value of the MAXSESSIONS parameter is 20.
  • If TRANSFERMETHOD=FASP, the default value of the MAXSESSIONS parameter is 2.

If you increase the number of sessions, you can improve throughput for the storage pool.

When you set a value for the MAXSESSIONS parameter, ensure that the available bandwidth and the processor capacity of the source and target servers are sufficient.

Tips:
  • If you issue a QUERY SESSION command, the total number of sessions might exceed the number of data sessions. The difference is because of short control sessions that are used to query and set up operations.
  • The number of sessions that are used for replication depends on the amount of data that is replicated. If you are replicating only a small amount of data, increasing the number of sessions provides no benefit.
DUration
Specifies the maximum number of minutes that the storage rule runs before it is automatically canceled. You can specify a number in the range 60 - 1440. The default value is unlimited. If you do not specify a value, or if you specify a value of NOLimit, the storage rule runs until it is completed. This parameter is optional.
STARTTime
Specifies the time for the beginning of the window in which the storage rule is first processed. The default is the current time. This parameter is optional. The storage rule runs daily within 5 minutes following the specified time.
Specify one of the following values:
Value Description Example
HH:MM:SS A specific time. 23:30:08
NOW The current time. NOW
NOW+HH:MM or +HH:MM The current time plus the specified number of hours and minutes. NOW+02:00 or +02:00
NOW-HH:MM or -HH:MM The current time minus the specified number of hours and minutes. NOW-02:00 or -02:00
Linux operating systemsTRANSFERMethod
Linux operating systemsSpecifies the method that is used for server-to-server data transfer. This parameter is optional. You can specify one of the following values:
Tcpip
Specifies that TCP/IP is used to transfer data. This value is the default.
Fasp
Specifies that IBM® Aspera® Fast Adaptive Secure Protocol (FASP®) technology is used to transfer data. Aspera FASP technology can help you optimize data transfer in a wide area network (WAN). If you specify TRANSFERMETHOD=FASP, you override any TRANSFERMETHOD parameters that you specified on the DEFINE SERVER or UPDATE SERVER commands.
Restrictions:
DESCription
Specifies a description of the storage rule. This parameter is optional.

Example 1: Define a storage rule

Define a storage rule that is named repl_action to replicate data to the target server server1. Specify a start time of 03:00 AM that uses a maximum of 15 sessions for a replication storage rule:
define stgrule repl_action server1 actiontype=replicate maxsessions=15 starttime=03:00:00

Related commands

Table 1. Commands related to DEFINE STGRULE
Command Description
DEFINE SERVER Defines a server for server-to-server communications.
DEFINE SUBRULE (replicating) Defines an exception to a replicating storage rule.
DELETE STGRULE Deletes storage rules.
QUERY STGRULE Displays storage rule information.
UPDATE STGRULE (replicating) Updates a storage rule for replicating data.
UPDATE SUBRULE (replicating) Updates a subrule that is an exception to a replicating storage rule.