Transfer Appliance CLI 參考資料

ta check

檢查設備是否有錯誤。

劇情概要

診斷並協助顧客解決常見問題。這項指令的主要目標是盡早偵測到設定錯誤。

這項指令會檢查設備的多個層面,包括: - 硬體 - 軟體 - 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

設定設備。

劇情概要

設定或重新設定設備,準備好進行資料移轉。系統會保留並記住提供的設定,直到後續重新啟動,以及發出「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

顯示電器的診斷資訊。

劇情概要

收集有助於疑難排解的診斷資訊。包括系統設定檔副本和部分診斷工具的輸出內容。當中不含任何使用者資料。系統會將資訊收集到壓縮封存檔中,以便傳送給 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。

劇情概要

這項指令會停用 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。

劇情概要

這項指令可讓您使用 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 用戶端: Windows 用戶端使用不同的編碼,因此不應搭配 Windows NFSv3 用戶端使用這些 CLI 選項。如果是 Windows 用戶端,建議使用 SCP 或 SFTP 傳輸資料。只有在 Windows 用戶端保證所有檔案名稱都採用 ASCII 時,才能使用這些選項,但應提醒使用者,如果檔案名稱採用非 ASCII,就無法上傳至 GCS。

ta enable_nfsv3 [flags]

選項

  -h, --help   help for enable_nfsv3

ta finalize

完成設備準備作業。

劇情概要

確保裝置安全無虞,可供運送。具體來說,這會清除所有加密金鑰和持續性設定。也會移除儲存在設備本機儲存空間中的所有內容。請備份重要檔案或移至 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。

劇情概要

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

啟用/停用記錄功能的指令。

劇情概要

提供與記錄代理程式互動的介面。

ta logging [flags]

範例

    ta logging start
    ta logging stop

選項

  -h, --help   help for logging

ta 指標

啟用/停用指標的指令。

劇情概要

提供與監控工作流程互動的介面。

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

在設備上執行掛接。

劇情概要

安裝架可將裝置安裝在電器上。這個指令會包裝 Linux 的掛接指令。

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

停用設備的線上作業。

劇情概要

停用設備的線上轉移模式。即使網路連線正常,系統也不會將指定線上目錄中的資料從地端部署移至雲端。

ta offline [flags]

範例

    ta offline

選項

  -h, --help   help for offline

ta online

啟用裝置的線上轉移模式。

劇情概要

啟用設備的線上轉移模式。如果網路連線正常,系統會將指定線上目錄中的資料從地端部署環境移至 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

重設電器的線上轉移模式。

劇情概要

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

與 OS 互動的介面。

劇情概要

提供與 OS 互動的介面。您可以使用這項指令更新 OS、還原 OS,或顯示 OS 版本。

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 中。

劇情概要

在 ta_metadata 中輸出 fio 儲存空間效能基準指標的 CSV 檔案: - 時間戳記 - 設備序號 - 目前工作階段 ID - 設備型號 - Zimbru OS 版本 - 設備位置 - 基準讀取頻寬 - 基準讀取完成延遲時間 - 基準寫入頻寬 - 基準寫入完成延遲時間 - 基準參數

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

擷取並封存掛接在裝置上的資料。

劇情概要

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

重設

重設電器。

劇情概要

將電器重設為原始狀態。
也就是說,已複製到資料分割區的資料都會遺失。重設後,設備需要重新設定,這會格式化資料分割區,讓設備準備好進行資料移轉。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 狀態

顯示設備的狀態和健康資訊。

劇情概要

顯示設備的狀態和健康資訊: - 設備狀態:未設定、可供轉移、已完成。 - 設備的目前設定 (根據上次的「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 會卸載設備上的客戶掛接點,並從 {{.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,並掛接設備的資料分割區。

劇情概要

解封 DEK 並掛接設備的資料分割區。重新啟動後,必須執行這個指令,才能解除資料加密金鑰的密封狀態,並重新掛接資料分割區。您必須先執行這項指令,才能繼續資料移轉。

ta unseal [flags]

範例

    ta unseal

選項

  -h, --help   help for unseal

ta update

更新設備軟體的指令。

劇情概要

更新裝置上的軟體。

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 版本

顯示設備版本。

ta version [flags]

選項

  -h, --help   help for version

ta wipe

清除設備的資料分割區。

劇情概要

清除作業會以符合 NIST 標準的方式,清除裝置上的所有資料硬碟。系統會產生憑證,詳細列出已清除的硬碟,以及清除硬碟所用的工具。清除是不可逆的指令,也就是說,磁碟清除後就無法復原資料。

ta wipe [flags]

範例

    ta wipe

選項

  -h, --help   help for wipe