Platform: WindowsProducts: MSP360 Backup
Article ID: s0394Last Modified: 07-Oct-2026

Configuring GFS Retention Policy Settings in CLI

To enable the GFS retention policy and configure one of the available GFS keeping periods for a backup plan, use the following parameters with the add and/or edit plan commands:

Yearly Keeping Period

-gfsY (-gfsYearly). This parameter enables the GFS policy and sets the yearly GFS keeping period. 

Parameter syntax: -gfsY N or -gfsYearly N, where N is the number of years the yearly backup will be kept. N value must be an integer and >0. Maximum value for N: **1000**.

This parameter can be used along with -gfsW and -gfsM parameters.

Example: -gfsY 2. Note: this parameter cannot be applied in plans created in the legacy backup format.

Monthly Keeping Period

-gfsM (-gfsMonthly). This parameter enables the GFS policy and sets the monthly GFS keeping period. 

Parameter syntax: -gfsM N or -gfsMonthly N, where N is the number of months the monthly backup will be kept. N value must be an integer and >0. Maximum value for N: **100000**.*.*.

This parameter can be used along with -gfsW and -gfsY parameters.

Example: -gfsM 4. Note: this parameter cannot be applied in plans created in the legacy backup format.

Weekly Keeping Period

-gfsW (-gfsWeekly). This parameter enables the GFS policy and sets the weekly keeping period.

Parameter syntax: -gfsW N or -gfsWeekly N, where N is the number of weeks the weekly backup will be kept. N value must be an integer and >0. Maximum value for N: **100000**.*.*.

This parameter can be used along with -gfsM and -gfsY parameters.

Example: -gfsW 3. Note: this parameter cannot be applied in plans created in the legacy backup format.

Disabling GFS

To disable the specified GFS type for existing backup plans, use the following parameters with the edit plan commands:

-gfsWDisable (-gfsWeeklyDisable) disables the weekly GFS type, if enabled. The parameter has no arguments.
-gfsMDisable (-gfsMonthlyDisable) disables the monthly GFS type, if enabled. The parameter has no arguments.
-gfsYDisable (-gfsYearlyDisable) disables the yearly GFS type, if enabled. The parameter has no arguments.

CLI Examples

Create New Backup Plan with Enabled GFS Keeping Periods


This command creates a new backup plan in the format that supports the GFS policy, enables the GFS policy, and specifies the following keeping periods for GFS policy: weekly restore points are kept for 4 weeks, monthly restore points are kept for 2 months, yearly restore points are kept for 1 year. 

### Edit the Existing Plan and Enable Weekly and Monthly GFS Keeping Periods

```cbb.exe editBackupPlan -n "CLI GFS" -gfsM 20 -gfsWeekly 4```

This command enables the GFS settings for the existing backup plan named **CLI GFS**: enables the GFS policy with weekly backups kept for **4** weeks and monthly backups kept for **20** months.

### Edit the Existing Plan and Disable GFS Policy

```cbb.exe editBackupPlan -n "CLI GFS" -gfsWDisable -gfsMDisable -gfsYDisable``` 

This command disables all GFS settings for the existing backup plan **CLI GFS**.

Note that all existing weekly, monthly, and yearly backups will be kept according to the previously specified GFS settings.

https://git.cloudberrylab.com/egor.m/doc-help-std.git
Production