ti fs pack-file-system
将选定的本地叠加层状态打包到远程归档中。
语法
ti fs pack-file-system
[--archive-path <string>]
[--dry-run]
[--file-system-id <string>]
[--fs-token <string>]
[--help]
[--local-root <string>]
[--mount-path <string>]
[--mount-profile <string>]
[--path <string>]
[--remote-root <string>]
[--version]
选项
--archive-path <string>:打包后归档的路径。--dry-run:验证请求而不应用更改。--file-system-id <string>:选择文件系统。你也可以设置TI_FS_FILE_SYSTEM_ID。--fs-token <string>:设置 Filesystem 访问令牌。如果省略,命令会使用TI_FS_TOKEN环境变量。如果两者都未提供,命令会使用为所选 Filesystem 本地存储的令牌。--help:显示帮助信息。--local-root <string>:包含叠加层目录的本地叠加层根路径。--mount-path <string>:本地挂载路径。--mount-profile <string>:选择一个挂载预设:coding-agent、portable或none。如果省略,则使用none。--path <string>:用于打包的本地叠加层路径;可重复指定。--remote-root <string>:由本地叠加层表示的 TiDB Cloud 文件系统根路径。[default: /]--version:显示版本信息。
有关所有命令共享的选项,请参见全局选项。
示例
打包已挂载的工作区:
# Persist the local overlay associated with an existing mount. ti fs pack-file-system --file-system-id <file-system-id> --mount-path /path/to/workspace打包显式指定的根路径:
# Create a portable archive from selected local and remote roots. ti fs pack-file-system --file-system-id <file-system-id> --local-root /path/to/local-root --remote-root /workspace --mount-profile portable