Documentation Index

Fetch the complete documentation index at: https://kb.vastdata.com/llms.txt

Use this file to discover all available pages before exploring further.

protectedpath create

Prev Next

This command creates a protected path.

Usage

protectedpath create --name NAME
                     --source-dir SOURCE_DIR
                     --local-tenant-id ID
                     [--protection-policy-id PROTECTION_POLICY_ID]
                     [--target-exported-dir PATH_ON_PEER]
                     [--remote-target-id ID]                     
                     [--remote-tenant-name NAME]
                     [--sync-interval SYNC_INTERVAL]
                     [--capabilities ASYNC_REPLICATION|GLOBAL_ACCESS|ASYNC_REPLICATION_AND_GLOBAL_ACCESS|SYNC_REPLICATION]
                     [--source-member-capabilities ASYNC_REPLICATION|ASYNC_REPLICATION_AND_GLOBAL_ACCESS]
                     [--sync-disconnect-time TIME]
                     [--lease-expiry-time TIME]
                     [--enable-bucket-replication|--disable-bucket-replication]

Required Parameters

--name NAME

Sets a name for the 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 /

Source paths can be on or above subsystems, containing one or more subsystems. In this case, the target cannot be at or inside a subsystem.

--local-tenant-id ID

Specifies to which local tenant the path belongs.

Options

--protection-policy-id ID

Specifies which protection policy to apply, for an async replication 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.

--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.

Subsystems and volumes cannot be created at or in the target path while the Async Replication stream is in active state.

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-target-id ID

This option specifies a destination replication peer for global access or sync replication, for the first member stream of the protected path.

For async replication, the destination replication peer is specified within the protection policy, which is specified by --protection-policy-id ID.

--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|GLOBAL_ACCESS|ASYNC_REPLICATION_AND_GLOBAL_ACCESS|SYNC_REPLICATION

The mode or purpose of the first member stream of the protected path:

  • ASYNC_REPLICATION. The path is used for Asynchronous Replication

  • GLOBAL_ACCESS. The path is used for Global Access

  • ASYNC_REPLICATION_AND_GLOBAL_ACCESS. 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.

--source-member-capabilities ASYNC_REPLICATION|ASYNC_REPLICATION_AND_GLOBAL_ACCESS

Specifies the capabilities of the source path in the event of replication failover, if --capabilities is set to ASYNC_REPLICATION_AND_GLOBAL_ACCESS. Possible values:

  • ASYNC_REPLICATION. If the source switches replication role with the destination, the source does not become a global folder.

  • ASYNC_REPLICATION_AND_GLOBAL_ACCESS. If the source switches replication roles with the destination, the source also becomes a global folder.

--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.

--enable-bucket-replication

Enables bucket replication for the protected path.

Bucket replication cannot be enabled or disabled after the protected path is created.

Bucket replication recreates a bucket for you on each destination peer of the protected path. The bucket is configured with the properties of the source bucket on the replication source peer.

For more details about bucket replication and the default setting, see S3 Access to Replicated Data.

--disable-bucket-replication

Configures the protected path without bucket replication.

Bucket replication cannot be enabled or disabled after the protected path is created.

Bucket replication recreates a bucket for you on each destination peer of the protected path. The bucket is configured with the properties of the source bucket on the replication source peer.

For more details about bucket replication and the default setting, see S3 Access to Replicated Data.

Example

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