protectedpath create

Prev Next

This command creates a protected path.

Usage

protectedpath create --name NAME
                     --protection-policy-id PROTECTION_POLICY_ID
                     --source-dir SOURCE_DIR
                      --local-tenant-id ID
                     [--target-exported-dir PATH_ON_PEER]
                     [--remote-tenant-name NAME]
                     [--sync-interval SYNC_INTERVAL]
                     [--capabilities ASYNC_REPLICATION | STARED_GLOBAL_NAMESPACE | REPLICATION_AND_GN | SYNC_REPLICATION]
                     [--sync-disconnect-time TIME]
                     [--lease-expiry-time TIME]

Required Parameters

--name NAME

Sets a name for the protected path.

--protection-policy-id ID

Specifies which protection policy to apply to the protected path.

Warning

After creating the protected path, it is not possible to change which policy is associated with the protected path. All changes to a protected path's snapshot schedule, replication schedule, and snapshot expiration must be done by modifying the protection policy. Those modifications affect all protected paths that use the same protection policy. To work around this limitation, create a protection policy per protected path.

--source-dir SOURCE-DIR

Specifies the path to a directory to back up. A snapshot of this directory will be taken periodically on the schedule configured in the protection policy.

For example: --source-dir /

--local-tenant-id ID

Specifies to which local tenant the path belongs.

Options

--target-exported-dir PATH_ON_PEER

For asynchronous replication or global access, specify the path on the destination peer where the data should be replicated. This must be a directory that does not yet exist on the destination peer.

Tip

You cannot use "/" as path on peer because that always exists already. Therefore if you would like to replicate all data under the root directory, you will need to replicate this to a subdirectory. e.g. path on peer = "mirror/"

--remote-tenant-name NAME

If --target-exported-dir is specified, this option specifies which tenant on the destination peer --target-exported-dir belongs to.

--sync-interval SYNC_INTERVAL

For asynchronous replication, the maximum duration gap between restore points of members in the replication group, in seconds. Guarantees that a common restore point exists between group members within the specified duration.

Default value: 86400 seconds (1 day)

--capabilities ASYNC_REPLICATION | STARED_GLOBAL_NAMESPACE | REPLICATION_AND_GN | SYNC_REPLICATION

The mode or purpose of the protected path:

  • ASYNC_REPLICATION.  The path is used for Asynchronous Replication

  • STARED_GLOBAL_NAMESPACE. The path is used for Global Access

  • REPLICATION_AND_GN. The path is used for Global Access and Asynchronous Replication. This configures the path for Global Access, but also captures snapshots as with Asynchronous Replication, that can be used if the Global Access connection drops on the replication group.

  • SYNC_REPLICATION. The path is used for Synchronous Replication.

If SYNC_REPLICATION is specified, --sync-disconnect-time must also be specified.

If not specified, ASYNC_REPLICATION is assumed.

--sync-disconnect-time TIME

The  period of time, in seconds, after which a primary and secondary cluster, configured for synchronous replication, will revert to standalone clusters (and no longer replicate data) if communication between them is lost.

Default value:  45 seconds

--lease-expiry-time TIME

For global access, the duration for which data that was already requested at the destination path can be read locally from cache without the destination peer requesting it from the source peer. When the lease expires, the cache is invalidated and the next read request for the data is requested again from the source peer.

Example

vcli: admin> protectedpath create --name stream1 --protection-policy-id 1 --source-dir /