UPDATE RETRULE (Update a retention rule)

Use this command to update the attributes of a retention rule. The changes that you make do not affect the attributes of retention sets that were already created based on the rule. The changes apply only to new retention sets.

Privilege class

To issue this command, you must have system privilege or unrestricted policy privilege.

Syntax

Read syntax diagramSkip visual syntax diagram UPDate RETRule retrule_name add_clientremove_clientproperties
add_client
Read syntax diagramSkip visual syntax diagram ADD CLIent ,node_namenode_group_name ,filespace_name1NAMEType=SERVERNAMEType=SERVERUNIcodeFSIDCODEType=BOTHCODEType=UNIcodeNONUNIcodeBOTH
remove_client
Read syntax diagramSkip visual syntax diagram REMove CLIent ,node_namenode_group_name ,filespace_nameNAMEType=SERVERNAMEType=SERVERUNIcodeFSIDCODEType=BOTHCODEType=UNIcodeNONUNIcodeBOTH
properties
Read syntax diagramSkip visual syntax diagramSTARTTime=timeSTARTDate=dateclassic_scheduleenhanced_scheduleRETention=daysNOLimitACTive=YesNoDESCription=description
classic schedule
Read syntax diagramSkip visual syntax diagramSCHEDStyle=ClassicFREQuency=WeeklyMonthlyQuarterlyYearlyOnetimeDAYofweek=ANYWEEKDayWEEKEndSUndayMondayTUesdayWednesdayTHursdayFridaySAturday
enhanced schedule
Read syntax diagramSkip visual syntax diagramSCHEDStyle=EnhancedMONth=ANY,JAnuary FebruaryMARchAPrilMayJUNeJULyAUgustSeptemberOctoberNovemberDecemberDAYOFMONth=ANY,DAyWEEKOFMONth=,ANYFIrstSecondThirdFOurthLastDAYofweek=ANYWEEKDayWEEKEnd,SUndayMondayTUesdayWednesdayTHursdayFridaySAturday
Notes:
  • 1 The filespace_name must correspond to an IBM Spectrum Protect for Virtual Environments virtual machine. If you specify a file space name, you can specify only one fully qualified node name. Instead of specifying a file space name, you can specify the name of the virtual machine. This is relevant for both the add client and remove client actions.
Note:

Parameters

retrule_name (Required)
Specifies the name of the retention rule. The name must be unique, and the maximum length is 64 characters.
node_name or node_group_name (Required)
Specifies the name of the client node or node groups to which the retention rule applies. To specify multiple node names and node group names, separate the names with commas and no intervening spaces. You can use wildcard characters with node names but not with node group names. If you specify a file space name, you can specify a single node name only.
filespace_name
Specifies the name of a file space to which the retention rule applies. The file space name corresponds to the name of an IBM Spectrum Protect for Virtual Environments virtual machine. Instead of specifying a file space name, you can also specify the name of the virtual machine. The file space name can include wildcard characters if the NAMETYPE and the CODETYPE parameters are not specified. To specify a file space that contains a comma in the name, you must specify the file space numerical ID and then specify NAMETYPE=FSID.
Tip: Issue the QUERY FILESPACE command to determine which file spaces and file space IDs are defined for a node on the server.
NAMEType
Specifies how you want the server to interpret the file space name that you enter. Use this parameter only when you specify a partially or a fully qualified file space name.

The default value is SERVER. If a virtual filespace mapping name is specified, you must use SERVER. You can specify one of the following values:

SERVER
The server uses the server's code page to interpret the file space name.
UNIcode
The server converts the file space 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. Conversion fails 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 file space name as the file space ID (FSID).
CODEType
Specifies the type of file spaces to be included in retention rule processing. The default value is BOTH, meaning that file spaces are included regardless of code page type. Use this parameter only when you enter a single wildcard character for the file space name. You can specify one of the following values:
UNIcode
Specifies only file spaces that are in Unicode.
NONUNIcode
Specifies only file spaces that are not in Unicode.
BOTH
Specifies all file spaces regardless of code page type.
STARTTime
Specifies the beginning time in a range of times in which the retention rule is first processed. The default is the current time. This parameter is optional. You can update the STARTTime as follows, depending on the type of retention rule.
  • One-time only
    For a one-time only retention rule, the STARTTime can be a time in the past. Files that were active from the specified time and that are still stored on the IBM Spectrum Protect server are to be included in the retention set, even if they are inactive at the time you issue the command. You can update the STARTTime value, but only for retention set creation runs that have not yet started to run.
    Restriction: If a node on a server is the target node for a node replication operation from another server, the creation of one-time only retention sets for a time and date that is in the past cannot be triggered for such a node.
  • Scheduled

    For a scheduled retention set creation run that is scheduled to run today, you can make updates to the existing schedule run provided that the run has not yet already started or completed today. If the run has already started or completed today, you can change the schedule to run tomorrow or later.

Tip: For retention sets that are created in the past, an information message is issued to the activity log that indicates that the retention set can include files as they existed in the past. For example, expiration processing or other deletion activities might have deleted one or more of files that would have been included in the retention set had the retention set been created at that point in time in the past.
You can 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
STARTDate
Specifies the beginning date in a range of dates in which the retention rule is first processed. This parameter is optional. The default is the current date. You can update the STARTDate as follows, depending on the type of retention rule.
  • One-time only
    For a one-time only retention rule, the STARTDate can be a date in the past. Files that were active from the specified date and that are still stored on the IBM Spectrum Protect server are to be included in the retention set, even if they are inactive at the time you issue the command. You can update the STARTDate value, but only for retention set creation runs that have not yet started to run.
    Restriction: If a node on a server is the target node for a node replication operation from another server, the creation of one-time only retention sets for a time and date that is in the past cannot be triggered for such a node.
  • Scheduled

    For a scheduled retention set creation run that is scheduled to run today, you can make updates to the existing schedule run provided that the run has not yet started or completed today. If the run has already started or completed today, you can only change the schedule to run tomorrow or later.

Tip: For retention sets that are created in the past, an information message is issued to the activity log, which indicates that the retention set might include files as they existed in the past. For example, expiration processing or other deletion activities might have deleted one or more of files that would have been included in the retention set had the retention set been created at that point in time in the past.
You can specify one of the following values:
Value Description Example
MM/DD/YYYY A specific date. 05/15/2018
TODAY The current date. TODAY
TODAY+days or +days The current date plus the number of specified days. The maximum number of days that you can specify is 9999. TODAY+3 or +3
EOLM (End Of Last Month) The last day of the previous month. EOLM
EOLM-days The last day of the previous month minus the specified number of days. EOLM-1

To include files that were active a day before the last day of the previous month

BOTM (Beginning Of This Month) The first day of the current month BOTM
BOTM+days The first day of the current month, plus the number of specified days. BOTM+9

To include files that were active on the 10th day of the current month

RETention
Specifies the length of time, in days, for which any retention set that is created by the retention rule is retained by the server. This parameter is optional.

The retention period that you specify is used as the retention period value of any retention sets created from the rule; however, you can change this value by issuing the UPDATE RETSET command. Data that is contained in a retention set does not expire until the retention period of that retention set has passed, irrespective of the management class and copy group policies associated with that data. You can specify one of the following values:

days
Specify an integer value in the range 0 - 30,000.

After you determine the length of time to retain data, you can use the following table to convert the number of years to days. Accordingly, if the period includes a leap year, adjust the number of days.

Table 1. Sample number of days to years
Number of years Number of days to years
1 year 365
2 years 730
3 years 1095
4 years 1461
5 years 1826
6 years 2191
7 years 2556
8 years 2921
9 years 3287
10 years 3652
20 years 7304
30 years 10957
40 years 14609
50 years 18262
NOLimit
Specifies that you want to keep the retention set indefinitely. If you specify NOLimit, the server retains retention sets forever, unless an authorized user or administrator deletes the retention set. For information on the DELETE RETSET command, see DELETE RETSET (Delete a retention set).
ACTive
Specifies whether the retention rule is used by the IBM Spectrum Protect server to create retention sets based on the scheduling criteria. This parameter is optional.
Yes
Specifies that the retention rule is active. To allow retention sets to be created by the retention rule, the ACTIVE parameter must be set to Yes.
No
Specifies that the retention rule is not in an ACTIVE state and as such, retention sets are not created by this retention rule. To suspend the creation of retention sets by this rule, set the ACTIVE parameter to No. To resume the creation of retention sets, set this parameter to Yes.
DESCription
Specifies a description for the retention rule. This description is copied to the retention sets that are created by this retention rule. This parameter is optional.

The maximum length of the description is 255 characters. Enclose the description in quotation marks if it contains any blank characters.

SCHEDStyle
This parameter is optional. The SCHEDSTYLE parameter defines either the interval between times when a schedule can run, or the days on which it runs. The default is the Classic value.
You can specify one of the following values:
Classic
The parameter for the Classic syntax is DAYOFWEEK. If you specify SCHEDSTYLE=CLASSIC, you cannot specify the following parameters: MONTH, DAYOFMONTH, and WEEKOFMONTH.
Enhanced
The parameters for the Enhanced syntax are MONTH, DAYOFMONTH, WEEKOFMONTH, and DAYOFWEEK. If you specify SCHEDSTYLE=ENHANCED, you cannot specify the FREQUENCY parameter.
FREQuency
Specifies the schedule on which retention sets are created for this retention rule. The default value is WEEKLY. You can specify the FREQUENCY parameter with the SCHEDSTYLE=CLASSIC setting only.
Restriction: If you specify FREQuency=ONETIME, you cannot change this value. Conversely, if you specify a value other than ONETIME, you cannot change this value to ONETIME at a later point.

Example: Update a retention rule to add a new client node

Update retention rule RULE1 to add a new client note TESTNODE.

update retrule rule1 add client testnode

Example: Update a retention rule to change the retention period

Update retention rule RULE1 to change the retention period to 60 days.
update retrule rule1 retention=60

Related commands

Table 2. Commands related to UPDATE RETRULE
Command Description
DEFINE RETRULE Defines a retention rule.
QUERY RETRULE Displays information about retention rules.
DELETE RETRULE Deletes a retention rule.
RENAME RETRULE Renames a retention rule.