ti fs create-layer
Creates an isolated change layer over a base root. If --layer-id is omitted, the service generates one.
Syntax
ti fs create-layer
--base-root-path <string>
[--actor-id <string>]
[--dry-run]
[--durability-mode <string>]
[--file-system-id <string>]
[--fs-token <string>]
[--help]
[--layer-id <string>]
[--layer-name <string>]
[--tag <string>]
[--version]
Options
--base-root-path <string>: Base root path in the TiDB Cloud file system. [required]--actor-id <string>: Actor ID identifying the layer owner (for example, the agent name).--dry-run: Validate the request without applying changes.--durability-mode <string>: Layer durability mode; must berestore-safe.--file-system-id <string>: Select the file system. You can also setTI_FS_FILE_SYSTEM_ID.--fs-token <string>: Set the file system user token. If omitted, usesTI_FS_TOKEN.--help: Display help information.--layer-id <string>: The layer ID. Normally it is generated by the service automatically.--layer-name <string>: The name of the layer.--tag <string>: Tags for the layer,key=value; repeatable.--version: Display version information.
For options shared by all commands, see Global options.
Examples
Create a layer:
# Start an isolated writable view over the selected base root. ti fs create-layer --file-system-id <file-system-id> --base-root-path /workspace --layer-name agent-taskCreate a restore-safe tagged layer:
# Request durable layer behavior and attach task metadata. ti fs create-layer --file-system-id <file-system-id> --base-root-path /workspace --durability-mode restore-safe --tag task=review