差分
このページの2つのバージョン間の差分を表示します。
| 両方とも前のリビジョン 前のリビジョン | |||
| ja:documentation:07_technical_annexes:07_backup_and_restore_procedures [2023/11/14 06:21] – [手動リストア] junichi | ja:documentation:07_technical_annexes:07_backup_and_restore_procedures [2026/09/06 17:32] (現在) – 削除 - 外部編集 (不明な日付) 127.0.0.1 | ||
|---|---|---|---|
| 行 1: | 行 1: | ||
| - | ====== バックアップおよびリストア手順 ====== | ||
| - | {{indexmenu_n> | ||
| - | [[ja: | ||
| - | |||
| - | ===== バックアップ手順 ===== | ||
| - | |||
| - | |||
| - | |||
| - | ==== データベースバックアップ ==== | ||
| - | |||
| - | Firstly, make a backup of the existing database. There are two methods available to make such backup. | ||
| - | |||
| - | 最初に、データベースをバックアップする必要があります。バックアップには 2つの方法があります。 | ||
| - | |||
| - | <WRAP center round important 60%> If a history database is used, perform its backup as well. </ | ||
| - | |||
| - | <WRAP center round important 60%> ヒストリデータベースを利用している場合は、そのバックアップも実行します。 </ | ||
| - | |||
| - | === 手動バックアップ === | ||
| - | |||
| - | Open a terminal window with the appropriate user credentials and enter the following commands (enter the access credentials for the database): | ||
| - | |||
| - | 適切な権限のユーザでターミナルウィンドウを開き、次のコマンドを入力します(データベースのアクセス情報を入力します): | ||
| - | |||
| - | < | ||
| - | mysqldump -u < | ||
| - | < | ||
| - | |||
| - | </ | ||
| - | === Pandora FMS データベースバックアップユーティリティ === | ||
| - | |||
| - | Pandora FMS allows to [[: | ||
| - | |||
| - | Pandora FMS では、**自動検出(Discovery) > 新しいコンソールタスク(New console task)** から、ドロップダウンで **" | ||
| - | |||
| - | {{ : | ||
| - | |||
| - | To create a new database backup: | ||
| - | |||
| - | 新規データベースバックアップの作成には次のようにします。 | ||
| - | |||
| - | * Select the backup frequency or one-time with "Not scheduled" | ||
| - | * Select exactly when the "Next execution" | ||
| - | * You need to indicate the content of which groups to support (or select all " | ||
| - | * By default it is stored in ''/ | ||
| - | |||
| - | * 定期バックアップもしくは、" | ||
| - | * " | ||
| - | * サポートするグループの内容を指定する必要があります(または " | ||
| - | * デフォルトでは ''/ | ||
| - | |||
| - | Once you have finished filling in the fields, click on the Create button. | ||
| - | |||
| - | フィールドへの入力が完了したら、作成(Create) ボタンをクリックします。 | ||
| - | |||
| - | |||
| - | ==== 設定ファイルバックアップ ==== | ||
| - | Pandora のエージェントおよびサーバの設定ファイルをバックアップするには、次のコマンドを実行します。 | ||
| - | |||
| - | tar -pcvzf pandora_configuration.tar.gz / | ||
| - | |||
| - | ==== エージェントバックアップ ==== | ||
| - | エージェントディレクトリもバックアップする必要があります。すでに配布されているコレクションやエージェントプラグインを保存するために重要です。 | ||
| - | |||
| - | tar -pcvzf agent.tar.gz / | ||
| - | |||
| - | ==== サーババックアップ ==== | ||
| - | === サーバブラグイン === | ||
| - | サーバプラグインが置かれているデフォルトディレクトリは、/ | ||
| - | |||
| - | **注意**: 他のディレクトリ内にサーバプラグインがある場合は、それもバックアップする必要があります。 | ||
| - | |||
| - | < | ||
| - | tar -pcvzf pandora_server.tar.gz / | ||
| - | tar -pcvzf my_plugin_folder.tar.gz / | ||
| - | </ | ||
| - | |||
| - | === リモート設定 === | ||
| - | リモートエージェントの動作のために、リモート設定ファイルおよびコレクションのバックアップが必要です。 | ||
| - | |||
| - | < | ||
| - | tar -pcvzf collections.tar.gz / | ||
| - | tar -pcvzf md5.tar.gz / | ||
| - | tar -pcvzf remote_agents_conf.tar.gz / | ||
| - | </ | ||
| - | |||
| - | ==== コンソールバックアップ ==== | ||
| - | カスタム画像、拡張などを保存するために、コンソールのバックアップを実行します。 | ||
| - | |||
| - | tar -pcvzf pandora_console.tar.gz / | ||
| - | |||
| - | ===== リストア手順 ===== | ||
| - | |||
| - | Perform the [[: | ||
| - | |||
| - | [[: | ||
| - | |||
| - | ==== データベースリストア ==== | ||
| - | <WRAP center round important 60%> | ||
| - | ヒストリ DB を利用している場合は、そのリストアも実行する必要があります。 | ||
| - | </ | ||
| - | |||
| - | === 手動リストア === | ||
| - | |||
| - | データベースが起動し、Pandora サーバとエージェントが停止していることを確認します。 | ||
| - | |||
| - | < | ||
| - | [root@localhost ~]# / | ||
| - | Starting mysqld: [ OK ] | ||
| - | [root@localhost ~]# / | ||
| - | Stopping Pandora FMS Server | ||
| - | [root@localhost ~]# / | ||
| - | Stopping Pandora Agent. | ||
| - | |||
| - | </ | ||
| - | |||
| - | <WRAP center round tip 60%>\\ | ||
| - | From version NG 754 onwards, [[: | ||
| - | </ | ||
| - | |||
| - | <WRAP center round tip 60%>\\ | ||
| - | バージョン NG 754 以降では、高可用性(HA)環境の[[: | ||
| - | </ | ||
| - | |||
| - | その後、データベースをリストアします。 | ||
| - | < | ||
| - | |||
| - | [root@localhost ~]# gunzip pandora.sql.gz | ||
| - | [root@localhost ~]# cat pandoradb.sql | mysql -u root -p pandora | ||
| - | Enter password: <enter the password in console> | ||
| - | |||
| - | </ | ||
| - | |||
| - | 次の方法でもリカバリできます。 | ||
| - | < | ||
| - | |||
| - | mysql –u root –p pandora | ||
| - | create database pandora; | ||
| - | use pandora; | ||
| - | source PATH BACKUP; | ||
| - | |||
| - | </ | ||
| - | |||
| - | <WRAP center round important 60%> 作成するデータベース名は、バックアップしたものと同じである必要があります。 </ | ||
| - | |||
| - | |||
| - | |||
| - | ==== 設定ファイルリストア ==== | ||
| - | 最初に、エージェントおよびサーバ設定ファイルをリストアします。 | ||
| - | |||
| - | [root@localhost ~]# tar -zxvf pandora_configuration.tar.gz -C / | ||
| - | |||
| - | ==== エージェントリストア ==== | ||
| - | エージェントディレクトリのリストアを実行します。 | ||
| - | |||
| - | [root@localhost ~]# tar -zxvf agent.tar.gz -C / | ||
| - | |||
| - | ==== サーバリストア ==== | ||
| - | === サーバプラグイン === | ||
| - | pandora server のメインのディレクトリおよび、プラグインの入ったディレクトリをリストアします。 | ||
| - | |||
| - | < | ||
| - | [root@localhost ~]# tar -zxvf pandora_server.tar.gz -C / | ||
| - | [root@localhost ~]# tar -zxvf my_plugin_folder.tar.gz -C / | ||
| - | </ | ||
| - | |||
| - | === リモート設定 === | ||
| - | リモートエージェントが正しく動作するために、リモート設定ファイルおよびコレクションファイルをリストアします。 | ||
| - | |||
| - | < | ||
| - | [root@localhost ~]# tar -zxvf collections.tar.gz -C / | ||
| - | [root@localhost ~]# tar -zxvf md5.tar.gz -C / | ||
| - | [root@localhost ~]# tar -zxvf remote_agents_conf.tar.gz -C / | ||
| - | </ | ||
| - | |||
| - | ==== コンソールリストア ==== | ||
| - | カスタム画像や拡張などを含め、コンソールのリストアを行います。 | ||
| - | |||
| - | [root@localhost ~]# tar -zxvf pandora_console.tar.gz -C / | ||
| - | |||
| - | ==== Pandora FMS サーバおよびエージェントの起動 ==== | ||
| - | 最後に、Pandora FMS サーバとエージェントを起動します。 | ||
| - | |||
| - | < | ||
| - | [root@localhost ~]# / | ||
| - | [root@localhost ~]# / | ||
| - | </ | ||
| - | |||
| - | [[ja: | ||