Updated on 2024-09-05 GMT+08:00

Configuring an Automated Snapshot Policy

You can select a snapshot type and set one or more automated snapshot policies for a cluster. After an automated snapshot policy is enabled, the system automatically creates snapshots based on the time, period, and snapshot type you configured.

Procedure

  1. Log in to the GaussDB(DWS) console.
  2. In the navigation pane, choose Clusters > Dedicated Clusters.
  3. In the cluster list, click the name of the target cluster. The Cluster Information page is displayed.
  4. Click the Snapshots tab page and click Policy List. All policies of the current cluster are displayed on the Policy List page. Toggle on Snapshot Policy.

    • indicates that the policy is enabled (default). The default retention period is three days.
    • indicates that the automatic snapshot function is disabled.

  5. After this function is enabled, you can set the retention mode and the backup device used by the current cluster for automated snapshots. For more information, see Table 1.

    Table 1 Automated snapshot parameters

    Parameter

    Description

    Retention Days

    Retention days of the snapshots that are automatically created. The value ranges from 1 to 31 days.

    NOTE:

    Snapshots that are automatically created cannot be deleted manually. The system automatically deletes these snapshots when their retention duration exceeds the threshold.

    Backup Device

    Select OBS or NFS from the drop-down list.

    NFS Backup File System Address (NFS)

    NFS shared IP address. Enter the IP address of the SFS shared path. After the mounting is successful, a mount directory is created in the /var/chroot/nfsbackup directory of the cluster instance by default.

  6. After automated snapshot is enabled, you can configure its parameters. For more information, see Table 2.

    The snapshot creation time is UTC, which may be different from your local time.

    • If the snapshot type is set to Full, you can choose either Periodic or One-time, as shown in the following figures.
      • Periodic: Specify the days for every week/month and the exact time on the days.

        Choosing the days in red (29th/30th/31st) may skip some monthly backups. Policy and execution depend on the specific month and date you choose.

      • One-time: Specify a day and the exact time on the day.

    • Incremental snapshots can be set only to Periodic, as shown in the first figure below.

      When configuring a periodic incremental snapshot policy, you can specify the days for every week/month and the exact time on the days. You can also specify the start time and interval for the snapshots.

    Table 2 Snapshot policy parameters

    Parameter

    Description

    Name

    The policy name must be unique, consist of 4 to 92 characters, and start with a letter. It is case-insensitive and can contain only letters, digits, hyphens (-), and underscores (_).

    Type

    You can choose either full or incremental snapshots.

    NOTE:
    • A full snapshot is created after every fifteen incremental snapshots are created.
    • Incremental snapshot restoration is based on full snapshots. Incremental snapshots are used to restore all data to the time point when they were created.
    • An incremental snapshot records the changes made after the previous snapshot was created. A full snapshot backs up the data of an entire cluster. It takes a short time to create an incremental snapshot, and a long time to create a full snapshot. When restoring a snapshot to a new cluster, GaussDB(DWS) uses all snapshots between the latest full backup and the current snapshot.

    Policy

    You can choose either periodic or one-time snapshots.

    NOTE:

    One-time can be selected only for full snapshots.

    One-time

    You can create a full snapshot at a specified time in the future. The UTC time is used.

    Periodic Policy Configurations

    You can create automated snapshots on a daily, weekly, or monthly basis:

    • Days: Specify days for every week or every month. Weekly and Monthly cannot be selected at the same time. For Monthly, the specified days are applicable only to months that contain the dates. For example, if you select 29, no automated snapshot will be created on February, 2022.
    • Time: Specify the exact time on the selected days. For incremental snapshots, you can specify the start time and interval. The interval can be 4 to 24 hours, indicating that a snapshot is created at an interval of 4 to 24 hours.
    NOTICE:

    Incremental snapshots can be set only to Periodic, as shown in the first figure below.

  7. Click OK.

    A maximum of three snapshot policies can be set for a cluster.

  8. (Optional) To modify an automated snapshot policy, click Modify in the Operation column.
  9. (Optional) To preview a policy, click Preview Policy. The next seven snapshots of the cluster will be displayed. If no full snapshot policy is configured for the cluster, the default policy is used, that is, a full snapshot is taken after every 15 incremental snapshots.

    Implementation of the same policy varies according to operations in the cluster. For example:

    • The policy preview time is for your reference only. The cluster triggers a snapshot within one hour before and after the preset time.
    • The next automated snapshots after cluster scale-out, upgrade, resize, and media modification are full snapshots by default.
    • If a periodic policy is used for a cluster, no automatic backup is allowed within 4 hours after the last automated snapshot is complete.
    • If the time for triggering snapshots of multiple policies conflicts, the priorities of the policies are as follows: one-time > periodic > full > incremental.
    • You can use any backup, full or incremental, to restore the full data of a resource.