📣
TiDB Cloud Premium is now in public preview. Unlimited growth, instant elasticity, advanced security for enterprise workloads. Try it out →

ti fs create-layer



Creates a layer for recording isolated changes over a Filesystem base path. 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>: Set the layer durability mode. The only explicitly supported value is restore-safe, which preserves changes in the remote layer so the layer can be restored after the local environment ends. If omitted, the service uses restore-safe.
  • --file-system-id <string>: Select the file system. You can also set TI_FS_FILE_SYSTEM_ID.
  • --fs-token <string>: Set the Filesystem token. If omitted, the command uses the TI_FS_TOKEN environment variable. If neither is provided, the command uses the local token stored for the selected Filesystem.
  • --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-task
  • Create 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

Was this page helpful?