protectionpolicy modify

Prev Next

This command modifies a protection policy.

Usage
protectionpolicy modify --id ID
                       [--name POLICY_NAME]
                       [--peer-id PEER_ID]
                       [--schedule SCHEDULE] 
                       [--snapshot-prefix SNAPSHOT_PREFIX]
                       [--enable-lock]
Required Parameters

--id ID

Specifies the protection policy to modify.

Options

--name POLICY_NAME

Modifies the name of the protection policy.

--peer-id PEER_ID

Specifies the replication peer if --clone-type is either CLOUD_REPLICATION or NATIVE_REPLICATION.

If --clone-type is CLOUD_REPLICATION, specify the ID of an S3 replication peer.

If --clone-type is NATIVE_REPLICATION, specify the ID of an async replication peer.

Specify the ID as an integer.

Note

You cannot add an async replication peer to an existing local snapshot policy.

--schedule SCHEDULE

Modifies the schedule for snapshots and replication.

The schedule includes a period defined as a number of time units, a start date and time, a retention time limit for local snapshots and, for async replication, a retention time for remote snapshots.

Specify SCHEDULE in the following format:

every <number><time units> start at YYYY-MM-DD HH:MM:SS keep-local <number><time units> keep-remote <number><time units>

Where:

  • <time units> can be any of the following:

    • s - seconds

    • m - minutes

    • h - hours

    • d - days

    • W - weeks

    • M - months

    • Y - years

    Notice

    The W, M and Y options are available starting with VAST Cluster 4.6.0-SP22.

  • keep-local sets the amount of time to retain each local snapshot on the cluster.

    Note

    If --clone-type is set to CLOUD_REPLICATION, then the minimum supported period is 6 hours, which can be specified as 6h.

  • keep-remote sets the amount of time to retain each snapshot on an async replication remote peer.

    Note

    S3 backups do not expire and do not have a retention period.

--snapshot-prefix SNAPSHOT_PREFIX

Modifies the prefix to use in the names of snapshots.

The name of each snapshot will be <prefix>_<timestamp>, where <prefix> is the prefix specified here and <timestamp> is the time the snapshot is created, in the format yyyy-mm-ddTHH:MM:SS.SSSSSSzzz (T denotes time and doesn't represent a value, zzz is the timezone, and the time is accurate to the microsecond). For example, if the prefix is dev, a snapshot taken at 8:15 pm UTC on 20th November 2024 would be named dev_2024-11-20T20:15:06.144783UTC.

--enable-lock

Makes the policy indestructible. Once this setting is enabled, deleting or modifying the protection policy requires unlocking the cluster's indestructibility mechanism.

Example

This example changes the snapshot prefix of replication policy 1 to "vast".

vcli: admin> protectionpolicy modify --id 1 --snapshot-prefix vast