ja:documentation:07_technical_annexes:07_backup_and_restore_procedures

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
ja:documentation:07_technical_annexes:07_backup_and_restore_procedures [2022/10/22 01:43] – [目的] junichija:documentation:07_technical_annexes:07_backup_and_restore_procedures [Unknown date] (現在) – 削除 - 外部編集 (Unknown date) 127.0.0.1
行 1: 行 1:
-====== バックアップおよびリストア手順 ======  
-{{indexmenu_n>7}} 
  
-[[ja:documentation:start|Pandora FMS ドキュメント一覧に戻る]] 
- 
-===== バックアップ手順 ===== 
- 
- 
- 
-==== データベースバックアップ ==== 
- 
-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> 
- 
-<WRAP center round important 60%> ヒストリデータベースを利用している場合は、そのバックアップも実行します。 </WRAP> 
- 
-=== 手動バックアップ === 
- 
-Open a terminal window with the appropriate user credentials and enter the following commands (enter the access credentials for the database): 
- 
-適切な権限のユーザでターミナルウィンドウを開き、次のコマンドを入力します(データベースのアクセス情報を入力します): 
- 
-<code> 
-mysqldump -u <pandora_db_user> -p <pandora_db_name> | gzip> pandoradb.sql.gz 
-<コンソールでパスワードを入力> 
- 
-</code> 
-=== Pandora FMS データベースバックアップユーティリティ === 
- 
-Pandora FMS allows to [[:en:documentation:03_monitoring:04_discovery#console_tasks|periodically perform a backup of the database]] that can be programmed in the following ways **Discovery** -> **New console task** and selecting from the drop-down menu **Backup Pandora FMS database**. 
- 
-Pandora FMS では、**自動検出(Discovery) > 新しいコンソールタスク(New console task)** から、ドロップダウンで **"Pandora FMS データベースのバックアップ(Backup Pandora FMS database)"** を選択することにより、[[:ja:documentation:03_monitoring:04_discovery#コンソールタスク|定期的なデータベースのバックアップ]] を設定できます。 
- 
-{{  :wiki:pfms-create-new-console-task-backup-db.png?800x550  |新規のバックアップコンソールタスク作成}} 
- 
-To create a new database backup: 
- 
-新規データベースバックアップの作成には次のようにします。 
- 
-  * Select the backup frequency or one-time with "Not scheduled". 
-  * Select exactly when the "Next execution" backup task will be started. 
-  * You need to indicate the content of which groups to support (or select all "All"). 
-  * By default it is stored in ''/var/www/html/pandora_console/attachment/backups''  but you can specify any directory to which you have write and read rights. 
- 
-  * 定期バックアップもしくは、"Not scheduled" で一回のみのバックアップを選択します。 
-  * "次の実行(Next execution)" バックアップタスクを開始するタイミングを正確に選択します。 
-  * サポートするグループの内容を指定する必要があります(または "すべて(All)" を選択します)。 
-  * デフォルトでは ''/var/www/html/pandora_console/attachment/backups''  に保存されますが、読み書きできる任意のディレクトリを指定することができます。 
- 
-Once you have finished filling in the fields, click on the Create button. 
- 
-フィールドへの入力が完了したら、作成(Create) ボタンをクリックします。 
- 
- 
-==== 設定ファイルバックアップ ==== 
-Pandora のエージェントおよびサーバの設定ファイルをバックアップするには、次のコマンドを実行します。 
- 
-  tar -pcvzf pandora_configuration.tar.gz /etc/pandora/*.conf 
- 
-==== エージェントバックアップ ==== 
-エージェントディレクトリもバックアップする必要があります。すでに配布されているコレクションやエージェントプラグインを保存するために重要です。 
- 
-  tar -pcvzf agent.tar.gz /usr/share/pandora_agent 
- 
-==== サーババックアップ ==== 
-=== サーバブラグイン === 
-サーバプラグインが置かれているデフォルトディレクトリは、/usr/share/pandora_server (Pandora サーバのメインディレクトリ) です。 
- 
-**注意**: 他のディレクトリ内にサーバプラグインがある場合は、それもバックアップする必要があります。 
- 
-<code> 
-tar -pcvzf pandora_server.tar.gz /usr/share/pandora_server 
-tar -pcvzf my_plugin_folder.tar.gz /home/myuser/my_plugin_folder 
-</code> 
- 
-=== リモート設定 === 
-リモートエージェントの動作のために、リモート設定ファイルおよびコレクションのバックアップが必要です。 
- 
-<code> 
-tar -pcvzf collections.tar.gz /var/spool/pandora/data_in/collections 
-tar -pcvzf md5.tar.gz /var/spool/pandora/data_in/md5 
-tar -pcvzf remote_agents_conf.tar.gz /var/spool/pandora/data_in/conf 
-</code> 
- 
-==== コンソールバックアップ ==== 
-カスタム画像、拡張などを保存するために、コンソールのバックアップを実行します。 
- 
-  tar -pcvzf pandora_console.tar.gz /var/www/html/pandora_console 
- 
-===== リストア手順 ===== 
-==== 4.1 アプライアンスのインストール ==== 
-サーバに CD を入れ起動画面でキーを押します。起動メニューが表示されます。 
- 
- 
- 
-{{ wiki:centos2.png?600 }} 
- 
- 
- 
-"Install (Text mode)" を選択すると、テキストモードでインストールが実行されます。インストールオプションを選択すると、グラフィカルなインストールが開始されます(推奨)。いずれかのオプションを選択し、インストール後、マシンを再起動します。 
- 
-==== データベースリストア ==== 
-<WRAP center round important 60%> 
-ヒストリ DB を利用している場合は、そのリストアも実行する必要があります。 
-</WRAP> 
- 
-=== 手動リストア === 
- 
-データベースが起動し、Pandora サーバとエージェントが停止していることを確認します。 
- 
-<code> 
-[root@localhost ~]# /etc/init.d/mysqld start 
-Starting mysqld: [ OK ] 
-[root@localhost ~]# /etc/init.d/pandora_server stop 
-Stopping Pandora FMS Server 
-[root@localhost ~]# /etc/init.d/pandora_agent_daemon stop 
-Stopping Pandora Agent. 
- 
-</code> 
- 
-<WRAP center round tip 60%>\\ 
-From version NG 754 onwards, [[:en:documentation:05_big_environments:07_server_management#manual_startupshutdown_for_pandora_fms_servers|additional options are available for manual startup and shutdown]] of High Availability (HA) environments.\\ 
-</WRAP> 
- 
-<WRAP center round tip 60%>\\ 
-バージョン NG 754 以降では、高可用性(HA)環境の[[:ja:documentation:05_big_environments:07_server_management#pandora_fms_サーバの手動起動・停止|手動起動および停止のための追加オプションがあります。]]\\ 
-</WRAP> 
- 
-その後、データベースをリストアします。 
-<code> 
- 
-[root@localhost ~]# gunzip pandora.sql.gz 
-[root@localhost ~]# cat pandoradb.sql | mysql -u root -p pandora 
-Enter password: <enter the password in console> 
- 
-</code> 
- 
-次の方法でもリカバリできます。 
-<code> 
- 
-mysql –u root –p pandora 
-create database pandora; 
-use pandora; 
-source PATH BACKUP; 
- 
-</code> 
- 
-<WRAP center round important 60%> 作成するデータベース名は、バックアップしたものと同じである必要があります。 </WRAP> 
- 
- 
- 
-==== 設定ファイルリストア ==== 
-最初に、エージェントおよびサーバ設定ファイルをリストアします。 
- 
-  [root@localhost ~]# tar -zxvf pandora_configuration.tar.gz -C / 
- 
-==== エージェントリストア ==== 
-エージェントディレクトリのリストアを実行します。 
- 
-  [root@localhost ~]# tar -zxvf agent.tar.gz -C / 
- 
-==== サーバリストア ==== 
-=== サーバプラグイン === 
-pandora server のメインのディレクトリおよび、プラグインの入ったディレクトリをリストアします。 
- 
-<code> 
-[root@localhost ~]# tar -zxvf pandora_server.tar.gz -C / 
-[root@localhost ~]# tar -zxvf my_plugin_folder.tar.gz -C / 
-</code> 
- 
-=== リモート設定 === 
-リモートエージェントが正しく動作するために、リモート設定ファイルおよびコレクションファイルをリストアします。 
- 
-<code> 
-[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 / 
-</code> 
- 
-==== コンソールリストア ==== 
-カスタム画像や拡張などを含め、コンソールのリストアを行います。 
- 
-  [root@localhost ~]# tar -zxvf pandora_console.tar.gz -C / 
- 
-==== Pandora FMS サーバおよびエージェントの起動 ==== 
-最後に、Pandora FMS サーバとエージェントを起動します。 
- 
-<code> 
-[root@localhost ~]# /etc/init.d/pandora_server start 
-[root@localhost ~]# /etc/init.d/pandora_agent_daemon start 
-</code> 
- 
-[[ja:documentation:start|Pandora FMS ドキュメント一覧に戻る]] 
  • ja/documentation/07_technical_annexes/07_backup_and_restore_procedures.1666402998.txt.gz
  • 最終更新: 2022/10/22 01:43
  • by junichi