差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン | ||
ja:documentation:pandorafms:technical_annexes:16_elastic_search_backup [2024/08/22 08:27] – [スナップショット] junichi | ja:documentation:pandorafms:technical_annexes:16_elastic_search_backup [2024/10/11 22:56] (現在) – [Elastic Search バックアップ] junichi | ||
---|---|---|---|
行 1: | 行 1: | ||
- | ====== Elastic Search バックアップ ====== | + | ====== Elastic Search バックアップとリストア |
{{indexmenu_n> | {{indexmenu_n> | ||
行 6: | 行 7: | ||
<WRAP center round info 90%> | <WRAP center round info 90%> | ||
- | From NG 774 version, Pandora FMS incorporates [[en: | + | From NG 774 version, Pandora FMS incorporates [[:en: |
</ | </ | ||
行 129: | 行 130: | ||
<wrap #ks2 /> | <wrap #ks2 /> | ||
- | ==== バックアップのリストア ==== | + | ===== バックアップのリストア ===== |
+ | |||
+ | * **On the target machine** | ||
* ターゲットマシンにて | * ターゲットマシンにて | ||
- | 1) ソースマシンでバックアップを作成するときに行ったのと同じように、設定ファイルの "elasticsearch.yml" を編集します。 | + | Modify the configuration file '' |
- | | + | [[# |
+ | |||
+ | <code bash> | ||
+ | vi / | ||
+ | |||
+ | </ | ||
+ | |||
+ | Add the following line: | ||
次の行を追加します。 | 次の行を追加します。 | ||
- | | + | < |
+ | path.repo: / | ||
- | {{ wiki: Elk2.png? | + | </ |
- | 2) 設定ファイルに追記したディレクトリを作成します。 | + | Create the directory previously added to the configuration file: |
- | mkdir -p / | + | 設定ファイルに追記したディレクトリを作成します。 |
- | 3) ディレクトリのパーミッションとユーザを設定します。 | + | <code bash> |
+ | mkdir -p / | ||
- | < | ||
- | chmod 700 / | ||
- | chown elasticsearch: | ||
</ | </ | ||
- | 4) サービスを再起動します。 | + | Grant read and write permissions to the directory: |
- | / | + | ディレクトリのパーミッションとユーザを設定します。 |
- | 5) ソースマシンからコピーしたバックアップを展開します。 | + | <code bash> |
+ | chmod 700 / | ||
+ | chown elasticsearch: | ||
- | tar -xzvf /home/ | + | </code> |
- | 6) スナップショットがある場所でリポジトリを作成します。 | + | Restart the service: |
- | < | + | サービスを再起動します。 |
+ | |||
+ | < | ||
+ | / | ||
+ | |||
+ | </ | ||
+ | |||
+ | Unzip the backup imported from the source machine: | ||
+ | |||
+ | ソースマシンからコピーしたバックアップを展開します。 | ||
+ | |||
+ | <code bash> | ||
+ | tar -xzvf / | ||
+ | |||
+ | </ | ||
+ | |||
+ | Create the repositories where the snapshots are located: | ||
+ | |||
+ | スナップショットがある場所でリポジトリを作成します。 | ||
+ | |||
+ | <code bash> | ||
curl -X PUT " | curl -X PUT " | ||
行 173: | 行 205: | ||
} | } | ||
' | ' | ||
+ | |||
</ | </ | ||
- | 7) インデックスを閉じます。 | + | Close the indexes: |
- | | + | インデックスを閉じます。 |
+ | |||
+ | <code bash> | ||
+ | curl -XPOST http:// | ||
+ | |||
+ | </ | ||
+ | |||
+ | <WRAP center round tip 90%> | ||
+ | |||
+ | The asterisk shows all indexes starting with that name, ''< | ||
- | <WRAP center round tip 60%> | ||
- | アスタリスクは、その名前で始まるすべてのインデックスを示します。 | ||
</ | </ | ||
- | 8) バックアップをインポートします。 | + | <WRAP center round tip 90%> |
- | 最初に、バックアップをリポジトリへコピーします。 | + | アスタリスクは、その名前 ''< |
- | cp <name of the snapshot.dat> | + | </WRAP> |
- | 大文字を使わずにファイル名を変更します。 | + | Import the backup, first copy the backup to the repository: |
- | mv my_backup_location/< | + | バックアップをリポジトリにインポートします。 |
- | 以下が重要です。 | + | <code bash> |
+ | cp < | ||
- | curl -X POST " | + | </code> |
- | 9) 最後に、インデックスを再度開きます。 | + | Rename the file without capital letters: |
- | | + | ファイル名を大文字なしに変更します。 |
+ | |||
+ | <code bash> | ||
+ | mv my_backup_location/< | ||
+ | |||
+ | </ | ||
+ | |||
+ | Finally, it is imported: | ||
+ | |||
+ | インポートされます。 | ||
+ | |||
+ | <code bash> | ||
+ | curl -X POST " | ||
+ | |||
+ | </ | ||
+ | |||
+ | Finally, reopen the indexes: | ||
+ | |||
+ | 最後に、インデックスを再度開きます。 | ||
+ | |||
+ | <code bash> | ||
+ | curl -XPOST http:// | ||
+ | |||
+ | </ | ||
[[ja: | [[ja: | ||
+ |