Transfer Appliance CLI 参考文档

ta check

检查设备是否存在错误。

Synopsis

诊断并帮助客户解决常见问题。此命令的主要目标是帮助尽早检测配置错误。

此命令会检查设备的多个方面,包括: - 硬件 - 软件 - ABM - 加密 - 密钥 - 使用情况 - 网络 - SSH

ta check [flags]

示例

    ta check
    ta check usage
    ta check hardware
    ta check {category}

选项

  -e, --env string   Environment to run the check in. (default "prod")
  -h, --help         help for check

ta config

配置设备。

Synopsis

配置或重新配置设备,使其为数据传输做好准备。提供的配置将保留,并在后续重启期间记住,直到发出“finalize”命令为止。稍后使用“status”命令查看当前配置。在配置期间,系统会创建 NFS 共享并将其导出以进行数据捕获。同时,系统会启用数据加密,以便复制的数据始终安全且受您控制。加密和装载数据分区只会执行一次;您可以随时重新运行“config”命令来更新网络设置。

ta config [flags]

示例

    ta config --data_port=RJ45 --ip=192.168.0.100/24 --gw=192.168.0.1
    ta config --data_port=RJ45 --ip=dhcp
    ta config --data_port=RJ45 --ip=dhcp --authorized_hosts=192.168.0.101
    ta config --data_port=RJ45 --ip=dhcp --authorized_hosts=192.168.0.101,192.168.0.0/28
    ta config --data_port=RJ45 --ip=192.168.0.100/24 --gw=192.168.0.1 --network_only --dns_servers=8.8.8.8
    ta config --data_port=QSFP --ip=192.168.0.100/24 --gw=192.168.0.1
    ta config --data_port=QSFP --ip=dhcp
    ta config --data_port=RJ45 --ip=dhcp --data_size=200T
    ta config --data_port=QSFP --ip=dhcp --network_only
    ta config --data_port=RJ45 --ip=dhcp --proxy_addr=http://10.10.10.10:3128
    ta config --data_port=RJ45 --ip=dhcp --proxy_addr=http://10.10.10.10:3128 --network_only
    ta config --data_port=RJ45 --ip=192.168.0.100/24 --gw=192.168.0.1 --proxy_addr=http://10.10.10.10:3128 --network_only

选项

  -a, --authorized_hosts strings   Comma-separated list of hosts that are allowed to connect to the NFS share. (default [*])
      --data_port string           Type of data port: 'RJ45', 'SFP', or 'QSFP'
      --data_size string           Resizes the data disk partition to the provided size. Does not change the existing data disk if left empty.
      --dns_servers strings        Comma-separated list of DNS name server addresses.
      --env string                 Environment to run the appliance configuration in. (default "prod")
      --fileshare string           File share protocol to configure: 'smb' or 'nfs' (default "nfs")
      --gw string                  IPv4 address of the default gateway. Must be provided for static IP configuration. Example: 192.168.6.1
  -h, --help                       help for config
      --ip string                  IPv4 & netmask address (for static setting), or 'dhcp' (for dynamic). Example: 192.168.6.11/24
      --json                       If true, command output is in JSON format.
      --network_interface string   Network interface to configure.
      --network_only               Configure the appliance network without changing the disk or fileshare configuration.
      --proxy_addr string          Proxy server address to configure. Must be in format http://<IP_ADDR>:<Port>. Example: http://10.10.10.10:3128
      --remove                     Removes the network configuration associated with the network interface provided.
      --restart_bind_mounts        Restart the bind mounts for ta_data and ta_local.

ta copy_ssh_keys

将 SSH 密钥复制到设备。

ta copy_ssh_keys [flags]

选项

  -h, --help   help for copy_ssh_keys

ta diagnostics

显示设备的诊断信息。

Synopsis

收集诊断信息,以便在出现任何问题时进行问题排查。这包括系统配置文件副本和一些诊断工具的输出,但不包括任何用户数据。系统会将信息收集到压缩的归档文件中,以便将其发送给 Google 进行问题排查。

ta diagnostics [flags]

示例

    ta diagnostics
    ta diagnostics --bmc

选项

  -B, --bmc    Include BMC FFDC logs in diagnostics logs
  -h, --help   help for diagnostics

ta disable_nfsv3

在设备上停用 NFSv3。

Synopsis

此命令会停用使用 NFSv3 客户端将数据转移到 Transfer Appliance 的功能。

ta disable_nfsv3 [flags]

选项

  -h, --help   help for disable_nfsv3

ta disable_online_operations

在设备上停用在线操作。

ta disable_online_operations [flags]

选项

  -h, --help   help for disable_online_operations

ta enable_nfsv3

启用使用 NFSv3 客户端将数据转移到 Transfer Appliance 的功能。

Synopsis

此命令会启用使用 NFSv3 客户端将数据转移到 Transfer Appliance 的功能。

启用 NFSv3 会对文件名编码施加限制。GCS (Google Cloud Storage) 要求文件名采用 UTF-8 编码。虽然 NFSv4 会在转移期间自动将文件名转换为 UTF-8,但 NFSv3 不会。

因此,如果使用 NFSv3: * 文件名采用非 UTF-8 编码的文件可能无法上传到 GCS。 * 如果上传失败,则可能由于文件名编码问题而难以识别失败的文件。

建议: 在使用 NFSv3 之前,请确保所有文件名都采用 UTF-8 编码。如果文件未采用 UTF-8 编码,请考虑改用 SCP 或 SFTP 进行转移。

Windows 客户端: 这些 CLI 选项不应与 Windows NFSv3 客户端搭配使用,因为 Windows 客户端使用不同的编码。对于 Windows 客户端,建议使用 SCP 或 SFTP 转移方法。只有当 Windows 客户端保证其所有文件名都采用 ASCII 编码时,才能使用这些选项,但应告知他们,文件名采用非 ASCII 编码的文件将无法上传到 GCS。

ta enable_nfsv3 [flags]

选项

  -h, --help   help for enable_nfsv3

ta finalize

完成设备的创建。

Synopsis

确保设备安全且已准备好发货。具体来说,此命令会清除所有加密密钥和持久配置, 还会移除设备本地存储空间中存储的所有内容。请备份重要文件或将其移至 ta_data 目录。 发出此命令后,将无法再进行数据转移。 此命令会移除 netplan 配置,并且更改仅在重启后生效。因此,设备会在重启后断开与网络的连接。 在运行此命令之前,绝不应寄送设备。系统会生成一个密码,您必须提供该密码才能获取退货配送标签;如有必要,运行“ta status”会报告该密码。

ta finalize [flags]

示例

    ta finalize

选项

  -h, --help                     help for finalize
      --non_repudiation          Verify the authenticity of arriving data. (default true)
      --skip_reencrypt_bmcpass   Skip reencrypting BMC passphrase.
      --skip_shred_mount_fstab   Skip shredding of opt/customer fstab file.
      --tpm_clear                Clear the TPM. (default true)

ta fsck

在设备上运行 fsck。

Synopsis

fsck 命令会检查设备的文件系统一致性。运行此命令不会对设备进行任何更改。它可确保在退回设备之前检测到任何文件系统错误。在将数据转移到 Google Cloud 期间调试文件系统错误可能具有挑战性或不可行, 这可能会导致数据上传延迟或失败。此命令可能需要 5 个多小时才能完成。运行此 命令后,可能需要重启系统。

ta fsck [flags]

示例

    ta fsck
    ta fsck -f
    ta fsck --fix

选项

  -f, --fix    Repair filesystem errors if found.
  -h, --help   help for fsck

ta logging

用于启用/停用日志记录的命令。

Synopsis

提供一个与日志记录代理交互的界面。

ta logging [flags]

示例

    ta logging start
    ta logging stop

选项

  -h, --help   help for logging

ta metrics

用于启用/停用指标的命令。

Synopsis

提供一个与监控工作流交互的界面。

ta metrics [flags]

示例

    ta metrics start
    ta metrics stop

选项

      --env string   Environment to run the metrics in. (default "prod")
  -h, --help         help for metrics

ta mount

在设备上运行 mount。

Synopsis

Mount 负责处理设备上的装载。它封装了 Linux 的 mount 命令。

ta mount [flags]

示例

    ta mount --version
    ta mount --list
    ta mount --all
    ta mount --types=nfs --source=nfs_server_ip:/nfs_share_directory --target=/mnt/ta_data_base/ta_mounts/mount_point
    ta mount --types=nfs --source=nfs_server_ip:/nfs_share_directory --target=/mnt/ta_data_base/ta_mounts/mount_point --options=rw,suid,dev,exec,auto,nouser,async
    ta mount --types=cifs --options=username=user1,password=password --source=//cifs_share_ip/share_name --target=/mnt/ta_data_base/ta_mounts/mount_point

选项

      --all              Mount all customer mounts.
  -h, --help             help for mount
      --list             List of customer mounts.
      --options string   Mount options given in a comma separated string, defaults is set as default. (default "defaults")
      --source string    Device being mounted.
      --target string    Mountpoint of the mount, expected to be under /mnt/ta_data_base/ta_mounts/.
      --types string     Filesystem type of the device to be mounted.
      --version          Version of the mount command.

ta offline

在设备上停用在线操作。

Synopsis

停用设备的在线转移模式。即使存在网络连接,指定在线目录中的数据也不会从本地移至 Cloud。

ta offline [flags]

示例

    ta offline

选项

  -h, --help   help for offline

ta online

启用设备的在线转移模式。

Synopsis

启用设备的在线转移模式。如果存在网络连接,指定在线目录中的数据将从本地移至 GCS。 (所需的服务帐号凭据应位于 /tmp/key.json 下)

ta online [flags]

示例

    ta online
    ta online --bucket=my-bucket --object_prefix=my-object_prefix
    ta online --bucket=my-bucket
    ta online --object_prefix=my-object_prefix

选项

      --agent_pool             Use agent pool in online transfer. (default true)
      --bucket string          Update destination bucket used in online transfer. If in online state, this will stop the running job and start a new transfer job. NOTE: This cannot be an empty string.
      --env string             Environment to run the online transfer in. (default "prod")
  -h, --help                   help for online
      --object_prefix string   Update bucket object prefix used for online transfer. If in online state, this will stop the running job and start a new transfer job.
      --skip_api_check         Bypass the required APIs check on the customer project.
      --skip_net_check         Bypass the network connectivity check that attempts to ping google.
      --skip_role_check        Bypass the HTA IAM Role check on the session service account.

ta online_reset

重置设备的在线转移模式。

Synopsis

Online reset puts the appliance in offline mode, deletes the folder /mnt/ta_metadata/state.
ta online_reset [flags]

选项

  -h, --help   help for online_reset

ta os

用于与操作系统交互的界面。

Synopsis

提供一个用于与操作系统交互的界面。借助此命令,您可以更新操作系统、回滚操作系统或显示操作系统版本。

ta os [flags]

示例

    ta os update
    ta os rollback
    ta os version

选项

  -h, --help              help for os
  -r, --rollback string   Rollback the updated OS.

ta performance

存储基准测试,用于将输出保存到 ta_metadata 中。

Synopsis

在 ta_metadata 中输出 fio 存储性能基准指标的 CSV 文件: - 时间戳 - 设备序列号 - 当前会话 ID - 设备型号 - Zimbru 操作系统版本 - 设备位置 - 基准读取带宽 - 基准读取完成延迟时间 - 基准写入带宽 - 基准写入完成延迟时间 - 基准参数

ta performance [flags]

示例

    ta performance
    ta performance --upload

选项

      --enable_standard_benchmarking   This temporary flag will be used to gradually rollout the new performance benchmark flow.
      --env string                     Environment for token to upload to cloud monitoring. (default "prod")
  -h, --help                           help for performance
      --token string                   Token to authenticate with google cloud.
      --upload                         Upload performance results to cloud monitoring.

ta pull

拉取并归档装载在设备上的数据。

Synopsis

Pull 会接收目录位置,并处理和归档其中存在的所有文件,然后将其保存到指定的目标位置。此命令会生成一个清单文件,用于描述 哪些文件保存到了哪个归档中。系统会将错误文件保存到目标位置,其中将 包含处理目标目录时遇到的任何错误。

ta pull [flags]

示例

    ta pull --target=/mnt/ta_data_base/ta_mounts/test --size="1GB" --max_archive_file_size="200 MB" --destination=/mnt/ta_data/destination
    ta pull --target=/mnt/ta_data_base/ta_mounts/test --size="1GB" --max_archive_file_size="200 MB" --destination=/mnt/ta_data/destination --count=22
    ta pull --target=/mnt/ta_data_base/ta_mounts/test
    ta pull --target=/mnt/ta_data_base/ta_mounts/test --no_archive
    ta pull --id=55555 --status
    ta pull -i=55555 --pause
    ta pull --id=55555 -r
    ta pull --cleanup

选项

  -C, --cleanup                        Cleanup the pull job.
  -c, --count int                      The number of tarballs to pull at once. (default 1)
  -d, --destination string             The destination directory where the files will be pulled. (default "/mnt/ta_data/")
  -h, --help                           help for pull
  -i, --id string                      The ID of the pull.
  -m, --max_archive_file_size string   The maximum size of the what is considered archivale file.
  -n, --no_archive                     Skips archiving all pulled files.
  -p, --pause                          Pause the pull job.
  -r, --resume                         Resume the pull job.
  -S, --size string                    The target tarball size. (default "1GB")
  -X, --status                         Get the status of the pull job.
  -t, --target string                  The target directory containing the files to be pulled and archived, expected to be under /mnt/ta_data_base/ta_mounts/.
  -T, --test                           Test the pull job.

ta reset

重置设备。

Synopsis

将设备重置为原始状态。
这意味着已复制到数据分区的任何数据都将丢失。 重置后,需要重新配置设备,这将格式化数据分区并使设备为数据传输做好准备。NFS/SMB 将被停用。网络配置将被重置,但更改仅在重启后生效。

ta reset [flags]

示例

    ta reset

选项

  -h, --help                     help for reset
      --preserve_key             Preserve HTA key.json on reset.
      --preserve_state           Preserve HTA state on reset.
      --skip_reencrypt_bmcpass   Skip reencrypting BMC passphrase.
      --skip_shred_mount_fstab   Skip shredding of opt/customer fstab file.

ta restart_nfs

重启设备上的 NFS 服务器。

ta restart_nfs [flags]

选项

  -h, --help   help for restart_nfs

ta status

显示设备的状态和运行状况信息。

Synopsis

显示设备的状态和运行状况信息: - 设备状态:未配置、准备转移、已完成。 - 设备的当前配置(根据上次“config”命令) - 脉冲信息(例如已用和可用存储空间、复制的文件数、转移速度) - 运行状况检查(例如不可用的磁盘、无效状态、无效配置)

ta status [flags]

示例

    ta status
    ta status --verbose

选项

  -h, --help      help for status
  -v, --verbose   If true, displays verbose status information.

ta telemetry_archive

用于归档遥测日志的命令。

ta telemetry_archive [flags]

选项

  -h, --help   help for telemetry_archive

ta timesync

管理时间同步

选项

  -h, --help   help for timesync

ta unmount

在设备上运行 unmount。

Synopsis

Unmount 负责处理设备上客户装载的卸载,并从 {{.CustomerFstab}}中移除条目。

ta unmount [flags]

示例

    ta unmount --version
    ta unmount --all
    ta unmount --target=/mnt/ta_data_base/ta_mounts/test

选项

      --all             Unmount all filesystems.
  -h, --help            help for unmount
      --target string   The target directory to unmount.
      --version         Print the version of the unmount command.

ta unseal

解封 DEK 并装载设备的数据分区。

Synopsis

解封 DEK 并装载设备的数据分区。重启后需要运行此命令,以解封数据加密密钥并重新装载数据分区。必须先运行此命令,然后才能继续进行数据传输。

ta unseal [flags]

示例

    ta unseal

选项

  -h, --help   help for unseal

ta update

用于更新设备上软件的命令。

Synopsis

更新设备上的软件。

ta update [flags]

示例

    ta update
    ta update --containers
    ta update --binaries
    ta update --os
    ta update --containers --binaries
    ta update --binaries --os
    ta update --containers --os
    ta update --containers --binaries --os
    ta update --rollback_binaries

选项

      --agent_pool          Use agent pool during update. (default true)
      --binaries            Update binaries on the appliance.
      --containers          Update containers on the appliance.
      --env string          Environment to conduct the update in. (default "prod")
  -h, --help                help for update
      --os                  Update OS on the appliance.
      --rollback_binaries   Perform binaries update rollback on the appliance.

ta version

显示设备版本。

ta version [flags]

选项

  -h, --help   help for version

ta wipe

擦除设备的数据分区。

Synopsis

Wipe 会以符合 NIST 标准的方式擦除设备上的所有数据驱动器。系统会生成一份证书,详细说明擦除的驱动器以及用于擦除驱动器的工具。 Wipe 是不可逆的命令,这意味着驱动器擦除后,无法恢复数据。

ta wipe [flags]

示例

    ta wipe

选项

  -h, --help   help for wipe