A snapshot rule defines the snapshot creation frequency and timing, and snapshot retention, and can be associated with file systems and files sets. The maximum number of snapshots that can exist at any one time for a file system or an independent file set is 224.
To work with this function in the management GUI, log on to the GUI and select
.The mksnaprule CLI command creates a new snapshot rule with a specified alphanumeric unique name that has a maximum of 256 characters. The command fails if an attempt is made to create a rule with a name that already exists. A warning is displayed if the attributes of the new rule are identical to an existing rule with a different name, and the option to proceed is prompted. A snapshot rule defines the snapshot creation frequency and timing, and snapshot retention, and can be associated with file systems and files sets by using the mksnapassoc CLI command. If no mksnaprule options are specified, the default rule options create a single snapshot daily at 00:00:00, where only the snapshot from the previous day is retained.
EFSSG0737W This rule is exceeding the 224 limit for snapshots to be generated.
If applied this may block snapshots to be created on the file set associated.
EFSSG0019I The snapshot rule ruleName has been successfully created.
EFSSG1000I The command completed successfully.
Likewise,
the mksnapassoc command
displays the following similar warning if the newly associated rule,
when added to all of the rules that are currently associated with
the independent file set, would increase the total number of retained
snapshots past the 224 limit:EFSSG0739 The sum of the rules applied is exceeding the 224 limit for snapshots to be generated.
This may block snapshots to be created on file system name or file set name.
You must specify the snapshot rule name, which must be unique within a system. You can use the --snap-prefix option to set the name prefix for snapshots that are created by the newly created rule. The default is no prefix, in which case the snapshot file name is the GMT date and time when the snapshot is created. If the default is not used, the snapshots are not visible from Windows clients.
The mksnaprule CLI command has many options to allow as much flexibility as possible, but this flexibility also makes it possible to specify option value combinations that would create a snapshot rule that is self-contradictory or that makes no sense. The command fails such attempts with information about the conflicting options that were specified.
To configure a new snapshot to be created at specified number minutes after the hour, use the -a or --minutesAfterHour option and specify the number of minutes after the hour in a comma-separated set of ascending unique values from 00 through 59. Each value must be at least an increment of 10 from the preceding value. These options cannot be used with the -x or --everyXMinutes options in the same snapshot rule.
To configure a new snapshot to be created at specified hours of the day, use the -h or --hour option and specify the hours as a comma-separated set of ascending unique values from 00 (midnight) through 23 (11PM). You can specify the all option to denote all 24 hours from 00 through 23, but in this specific case you cannot simultaneously specify the hourly parameter of the -q or --frequency option. You can also specify a range with a starting hour, a dash character, and ending hour. For example, you can specify a range from 10AM through 2PM as 10-14. You can only specify one value for the -a or --minutesAfterHour options when you also use the -q or --frequency options other than hourly, which is not valid when using the -h or --hour options. The -h or --hour options also cannot be used with the -x or --everyXMinutes options in the same snapshot rule. If you do not specify a value, the default value for the -h and --hour options is 00.
Specific days of the week, specific days of the month, specific weeks of the month, or specific months of the year can be specified. If a day of the month or week of the month is specified that does not occur every month, no snapshot will be taken for that day or for that week in those months. For example, if only the day of the month value 31 is specified and no other scheduling option is specified, snapshots are only created on months that have a 31st day. If only the 5th week of the month is specified and a month only has 4 weeks, no snapshot is created that month.
To configure a new snapshot to be created at specified days of the week, use the -d or --dayOfWeek option and specify a comma-separated set of ascending unique values from 0 through 7. Values 0, 1, 2, 3, 4, 5, 6, and 7 refer to Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, and Sunday, respectively. You can specify the all value to denote all eight values from 0 through 7. You can also specify a range for the value with a starting day number, a dash character and ending day number; for example, a value of 1-5 specifies Monday through Friday. If the --frequency option is used with the weekly or monthly values, the -d or --dayOfWeek option can only have one value; the default value in this case is 6 (Saturday). daily is invalid. The default when used with all other scheduling options is all. The -d or --dayOfWeek options cannot be used with the -n or --dayOfMonth options in the same snapshot rule.
To configure a new snapshot to be created at specified weeks of the month, use the -w or --week option and specify a comma-separated set of ascending unique values from 1 through 5. You can specify the all value to denote all five values from 1 through 5. You can also specify a range for the value with a starting week number, a dash character and ending week number; for example, a value of 1-3 specifies the first through the third week of the month. You can only specify one value for the -w or --week options when you specify any other periodic option. The -w and --week options cannot be used with the daily or weekly values of the -q or --frequency option in the same snapshot rule. If you do not specify a value, the default is every week of the month except when the monthly value of the -q or --frequency option is also specified, in which case the default is the first week of the month only. The -n and --dayOfMonth options and the weekly value of the -q or --frequency option cannot be used with the -w and --week options in the same snapshot rule.
To configure a new snapshot to be created at specified months of the year, use the -m or --month option and specify a comma-separated set of ascending unique two-digit numeric values from 01 through 12, where 01 designates January and 12 designates December. You can specify the all value to denote all twelve values from 01 through 12. You can also specify a range for the value with a starting month number, a dash character and ending month number; for example, a value of 02-08 specifies February through August. If you do not specify a value, the default is every month of the year (all). You can only specify one value for the -m or --month options when you specify any other periodic option. The -m and --month options cannot be used with the monthly value of the -q or --frequency option in the same snapshot rule.
To specify an exception time interval during which a snapshot is not created by the rule, even if those hours are otherwise specified by the rule, use the -e or --excludeHours option and specify a beginning and end time in the format hh{:mm:ss},hh{:mm:ss}, where hh is a one- or two-digit number designating the hour and is required; mm and ss are minutes and seconds respectively, and optional, both defaulting to 00 if not specified. The value at the beginning of the range defines the snapshot as being excluded at the that time; the value at the end of the range each defines the creation of snapshots as resuming at that time. The range value can span midnight, such as in the example 22,3. The -e or --excludeHours options can only be used if the rule otherwise specifies a schedule that creates more than one snapshot in a day.
To specify the maximum number of days for which to retain that day's most current snapshot, use the --maxDays option and specify a value from 0 to 224. For example, a value of 7 specifies to retain the most current daily snapshot for each of the past 7 days. If no value is specified, or the option is not used, the default is 1, to retain one day's most current snapshot. You cannot specify zero if you specify the daily value of the -q or --frequency option.
To specify the maximum number of weeks for which to retain that week's most current snapshot (not counting the current week), use the --maxWeeks option and specify a value from 0 to 224. For example, a value of 4 specifies to retain the most current weekly snapshot for each of the past 4 weeks, not counting this week. A week ends at 23:59:59 on Saturday evening. If no value is specified, or the option is not used, the default is 0. You cannot specify zero if you specify the weekly value of the -q or --frequency option; the default in this case is 1. You cannot specify the --maxWeeks option if you specify the monthly value of the -q or --frequency option.
To specify the maximum number of months for which to retain that month's most current snapshot (not counting the current month), use the --maxMonths option and specify an integer between 0 and 224. For example, a value of 12 specifies to retain the most current snapshot of the month for each of the past 12 months, not counting this month. A month ends at 00:00:00 on the first day of a new month. If no value is specified, or the option is not used, the default is 0. You cannot specify zero if you specify the monthly value of the -q or --frequency option; in this case, the default is 1.
You can use the -f or --force option to prevent display of the confirmation prompt when creating a new rule that has the identical definition of an existing rule.
# mksnaprule ruleName --frequency hourly -a 13
# mksnaprule ruleName -h 02,05,14,20 -a 15 --maxDays 5 --maxMonths 1