tiup mirror init

コマンドtiup mirror initは、空のミラーを初期化するために使用されます。初期化されたミラーには、コンポーネントまたはコンポーネントの所有者が含まれていません。このコマンドは、初期化されたミラーに対して次のファイルのみを生成します。

+ <mirror-dir>                                  # Mirror's root directory
|-- root.json                                   # Mirror's root certificate
|-- 1.index.json                                # Component/user index
|-- snapshot.json                               # Mirror's latest snapshot
|-- timestamp.json                              # Mirror's latest timestamp
|--+ keys                                       # Mirror's private key (can be moved to other locations)
   |-- {hash1..hashN}-root.json                 # Private key of the root certificate
   |-- {hash}-index.json                        # Private key of the indexes
   |-- {hash}-snapshot.json                     # Private key of the snapshots
   |-- {hash}-timestamp.json                    # Private key of the timestamps

上記のファイルの具体的な使用方法とコンテンツ形式については、 TiUP ミラー リファレンス ガイドを参照してください。

構文

tiup mirror init <path> [flags]

<path>は、TiUP がミラー ファイルを生成および保存するローカル ディレクトリを指定するために使用されます。ローカル ディレクトリは相対パスにすることができます。指定したディレクトリがすでに存在する場合は、空にする必要があります。存在しない場合は、TiUP が自動的に作成します。

オプション

-k, --key-dir

  • TiUP が秘密鍵ファイルを生成するディレクトリを指定します。指定したディレクトリが存在しない場合は、TiUP が自動的に作成します。
  • データ型: STRING
  • コマンドでこのオプションが指定されていない場合、TiUP はデフォルトで秘密鍵ファイルを{path}/keysに生成します。

出力

  • コマンドが正常に実行された場合、出力はありません。
  • 指定された<path>が空でない場合、TiUP はエラーError: the target path '%s' is not an empty directoryを報告します。
  • 指定された<path>がディレクトリでない場合、TiUP はエラーError: fdopendir: not a directoryを報告します。

<< 前のページに戻る - TiUP Mirror コマンド一覧

エコシステム
TiDB
TiKV
TiFlash
TiSpark
Chaos Mesh
© 2023 PingCAP. All Rights Reserved.