ja:documentation:pandorafms:installation:06_server_management

差分

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

この比較画面へのリンク

両方とも前のリビジョン 前のリビジョン
次のリビジョン
前のリビジョン
ja:documentation:pandorafms:installation:06_server_management [2024/05/12 07:51] – [ヒストリデータベース] junichija:documentation:pandorafms:installation:06_server_management [2025/02/26 02:17] (現在) – [アラート生成スクリプト] junichi
行 4: 行 4:
  
 [[ja:documentation:start|Pandora FMS ドキュメント一覧に戻る]] [[ja:documentation:start|Pandora FMS ドキュメント一覧に戻る]]
 +
 +<wrap #ks1 />
  
 ===== Pandora FMS サーバの手動起動/停止 ===== ===== Pandora FMS サーバの手動起動/停止 =====
  
-<WRAP center round info 75%>+<WRAP center round info 90%>
  
-Please note that if for maintenance reasons you want to manually stop Pandora FMS server, verify whether a service **Watchdog** is running. [[#watchdog_for_pandora_fms_servers|Check this section]] for more details.+Please note that if for maintenance reasons you wish to manually stop Pandora FMS server, verify whether a service **Watchdog** is running. [[#ks6|Check this section]] for more details.
  
 </WRAP> </WRAP>
  
-<WRAP center round info 75%>+<WRAP center round info 90%>
  
 メンテナンスにより Pandora FMS サーバを手動で停止する場合は、サービス**ウォッチドッグ**が実行されているかどうかを確認してください。詳細は、[[#pandora_fms_の_watchdog_実装|こちらの章]]を参照してください。 メンテナンスにより Pandora FMS サーバを手動で停止する場合は、サービス**ウォッチドッグ**が実行されているかどうかを確認してください。詳細は、[[#pandora_fms_の_watchdog_実装|こちらの章]]を参照してください。
行 19: 行 21:
 </WRAP> </WRAP>
  
-To start or stop manually Pandora FMS server execute the followin in a shell console:+To start or stop manually Pandora FMS server execute the following in a shell console:
  
-Pandora FMS を手動で起動・停止するには、コマンドラインから以下を実行します。 +Pandora FMS サーバを手動で起動・停止するには、コマンドラインから以下を実行します。
- +
-  * Stop the [[#daemon|daemon]] : +
- +
-  * [[#daemon|デーモン]]の停止 : +
- +
-<code> +
- +
-/etc/init.d/pandora_server stop +
- +
-</code> +
- +
-  * Start the daemon: +
- +
-  * デーモンの起動: +
- +
-<code> +
-/etc/init.d/pandora_server start +
- +
-</code> +
- +
-  * Restart the daemon: +
- +
-  * デーモンの再起動: +
- +
-<code> +
-/etc/init.d/pandora_server restart +
- +
-</code> +
- +
-<WRAP center round tip 60%>\\ +
-Version NG 756 or later.\\ +
-</WRAP> +
- +
-<WRAP center round tip 60%>\\ +
-バージョン NG 756 以上\\ +
-</WRAP> +
- +
-From version NG 756 onwards the previous instructions will also start the **pandora_ha** service. +
- +
-バージョン NG 756 以上では、上記の手順で **pandora_ha** サービスも起動されます。 +
- +
-To start and/or stop manually **only** the Pandora FMS server, you have to execute the following in a shell console: +
- +
-Pandora FMS サーバ **のみ** を手動で起動・停止するには、コマンドラインから次のように実行します。+
  
   * Stop the daemon:   * Stop the daemon:
行 71: 行 29:
   * デーモンの停止:   * デーモンの停止:
  
-<code> +<file>
-/etc/init.d/pandora_server stop-server+
  
-</code>+systemctl stop pandora_server 
 + 
 +</file>
  
   * Start the daemon:   * Start the daemon:
行 80: 行 39:
   * デーモンの起動:   * デーモンの起動:
  
-<code+<file
-/etc/init.d/pandora_server start-server+systemctl start pandora_server
  
-</code>+</file>
  
   * Restart the daemon:   * Restart the daemon:
行 89: 行 48:
   * デーモンの再起動:   * デーモンの再起動:
  
-<code+<file
-/etc/init.d/pandora_server restart-server+systemctl restart pandora_server
  
-</code>+</file>
  
-You can monitor the status of **pandora_ha** through **systemd** with:+You may monitor the status of [[en:documentation:pandorafms:complex_environments_and_optimization:06_ha|pandora_ha]]  through **systemd** with:
  
-**systemd** を通次のように **pandora_ha** の状態を確認できます。+次のようにして、**systemd** を通て [[ja:documentation:pandorafms:complex_environments_and_optimization:06_ha|pandora_ha]] の状態を確認できます。
  
 <code> <code>
行 103: 行 62:
 </code> </code>
  
 +<wrap #ks2 />
  
 ===== データベース管理 ===== ===== データベース管理 =====
  
-Pandora FMS infrastructure does not need external maintenance, but it is very important to purge old data, and maintain the database as much compacted as possible. There is an essential tool for the proper functioning of Pandora FMS which is in charge of carrying out these tasks. Its location is:+There is an essential tool for proper Pandora FMS performance, which is in charge of carrying out these tasks. Its location is:
  
-Pandora FMS インラストラクチャは外部メンテナンスを必要としませんが、古いデータを削除し、データベースをできるだけコンパクトに維持することが非常に重要です。 これらのタスク実行を担当する Pandora FMS に不可欠なツールがあります。そ以下にあす。+Pandora FMS が適切にパォーマンスを維持するためのタスク実行する重要なツールがあります。その場所次のとおす。
  
-<code>+<file>
 /usr/bin/pandora_db /usr/bin/pandora_db
  
-</code>+</file>
  
-This tool, hereinafter **pandora_db.pl**  is included in Pandora FMS server package, so it must be executed from a system where there is a Pandora FMS server installed. If there are two systems, one for the console and one for the server, **pandora_db**  must be executed where Pandora FMS server is hosted.+This tool, hereinafter **pandora_db.pl**  is included in Pandora FMS server package, so it must be executed from a system where there is a Pandora FMS server installed.
  
-このツール(以降 **pandora_db.pl**)は、Pandora FMS サーバパッケージに含まれているため、Pandora FMS サーバがインストールされているシステムから実行する必要があります。 コンソール用とサーバ用で 2つのシステムがある場合、Pandora FMS サーバがホストされている方で **pandora_db** を実行する必要があります。+このツール(以降 **pandora_db.pl**)は、Pandora FMS サーバパッケージに含まれているため、Pandora FMS サーバがインストールされているシステムから実行する必要があります。 
  
-**Pandora_db**  is a key tool for Pandora FMS to work properly, and that is why its execution is programmed in system cron tasks with an **hourly interval**. Its execution is configured within the file:+**pandora_db** is a key tool for Pandora FMS to work properly, and that is why its execution is programmed in system cron tasks with an **hourly interval**. Its execution is configured within the file:
  
-**Pandora_db** は、Pandora FMS が適切に動作するための重要なツールです。そのため、システムの cron タスクで一時間ごとに実行するように設定されています。 以下のファイルで設定されています。+**Pandora_db** は、Pandora FMS が適切に動作するための重要なツールです。そのため、システムの cron タスクで**一時間ごとに**実行するように設定されています。 以下のファイルで設定されています。
  
 <file> <file>
行 127: 行 87:
  
 </file> </file>
 +
 +This tool performs all database maintenance tasks automatically:
  
 このツールは、データベースの全てのメンテナンスを自動的に実行します。 このツールは、データベースの全てのメンテナンスを自動的に実行します。
  
-  * **It deletes old data**+  * It deletes old data. 
-  * **It compresses existing data**, interpolating them at several intervals, so that graphics are the same but the space needed to store them is much smaller (this is one reason why Pandora FMS is able to process such an amount of information)+  * It compresses existing data. 
-  * **It checks the consistency of the database for non-existing modules**, or modules that are not used because they can not be started (these modules appear in the tactical view as uninitialized modules). +  * It checks the consistency of the database for non-existing modules or uninitialized modules). 
-  * **It deletes the daily agent contact information**. Pandora FMS does not need more than 24hr agent contact history, and if it builds up, it slows down database access.+  * It deletes the daily agent contact information.
   * It **moves**  all old data to the standby history database.   * It **moves**  all old data to the standby history database.
  
-  * **古いデータの削除をします。** +  * 古いデータの削除をします。 
-  * **既存のデータを圧縮**し、いくつかの間隔を補間します。これにより、グラフは同じですが、それらを保存するために必要なスペースははるかに小さくなります(これが、Pandora FMS が大量の情報を処理できる理由の 1つです)。 +  * 既存のデータを圧縮します。 
-  * 存在しないモジュールのデータベースでの整合性や、初期化されていないために利用されていないモジュール (これらのモジュールは、未初期化モジュールとして表示されます) **チェックします**。 +  * 存在しないモジュールのデータベースでの整合性や、初期化されていないために利用されていないモジュールをチェックします。 
-  * **エージェントの一日の接続情報を削除します**。Pandora FMS は、24時間を越えるエージェント接続情報は必要としません。もし、それが増えると、データベースのアクセス速度が低下します。 +  * エージェントの一日の接続情報を削除します。 
-  * 全ての古いデータをスタンバイデータベースに移動します。+  * 全ての古いデータをトリデータベースに移動します。
  
 As mentioned before, **pandora_db**  execution is configured in system **cron** tasks and although this execution is automatically included in Pandora FMS server installation, it is convenient to check it. Therefore, ''/etc/cron.hourly/pandora_db''  must exist and contain the following: As mentioned before, **pandora_db**  execution is configured in system **cron** tasks and although this execution is automatically included in Pandora FMS server installation, it is convenient to check it. Therefore, ''/etc/cron.hourly/pandora_db''  must exist and contain the following:
行 168: 行 130:
  
 </code> </code>
 +
 +<wrap #ks3 />
  
 ===== メンテナンスツールの手動実行 ===== ===== メンテナンスツールの手動実行 =====
行 219: 行 183:
 ===== データベースバックアップ ===== ===== データベースバックアップ =====
  
-<WRAP center round important 60%>+<WRAP center round important 90%>
  
 It is important to remember that this **only** backs up or restores the database, //without including other files//, nor the server configuration. It is important to remember that this **only** backs up or restores the database, //without including other files//, nor the server configuration.
行 225: 行 189:
 </WRAP> </WRAP>
  
-<WRAP center round important 60%>+<WRAP center round important 90%>
  
 これは、他のファイルやサーバ設定を含めずに、データベース**のみ**のバックアップまたは復元であることを認識しておくことが重要です。 これは、他のファイルやサーバ設定を含めずに、データベース**のみ**のバックアップまたは復元であることを認識しておくことが重要です。
行 231: 行 195:
 </WRAP> </WRAP>
  
-The command **mysqldump** will do a complete database dump of the table structure as well as its contents. This is done by doing a full database dump, both of the table structure as well as their contents. This command has several options to do a backup, and its most basic usage is enough to dump from the same system where the database is hosted. Indicate the database name from which the backup will be done and the credentials to access it:+The command **mysqldump** will do a complete database dump of the table structure as well as its contents. This is done by doing a full database dump, both of the table structure as well as their contents. This command has several options to do a backup, //and its most basic usage is enough to dump from the same system where the database is hosted//.
  
-コマンド **mysqldump** は、テーブル構造とその内容の完全なデータベースダンプを行ます。このコマンドには、バックアップを実行するためのいくつかのオプションがありますがここでは最も基本的な使用法に焦点をあてます。これは、データベースを実行しているのと同じから実行することを意味します。 バックアッが行われるデータベース名とそれにアクセスするための認証情報を指定します。+コマンド **mysqldump** は、テーブル構造とその内容の完全なデータベースダンプをします。これは、テーブル構造とその内容の両方の完全なデータベースダンプを実行することによって行われます。このコマンドには、バックアップを実行するためのいくつかのオプションがあり、// 最も基本的な使用法は、データベースがホストされている同じテムからダンプするだけで十分で//
  
-<code> +For instance, to backup ''pandora'' database ( ''root'' user  and password ''pandora'') and dump the result to a file execute:
-mysqldump -u <user> -p <data_base>+
  
-</code>+たとえば、''pandora'' データベース (''root''ユーザと''pandora'' パスワード) をバックアップし、結果をファイルにダンプするには、次のコマンドを実行します。
  
-For instance, to backup "pandora" database and dump the result to an ''.sql'' file execute: +<file>
- +
-例えば、"pandora" データベースをバックアップし、''.sql'' ファイルにダンプを出力するには次のようにします。 +
- +
-<code>+
 mysqldump -u root -p pandora> /backup/pandoradb_backup.sql mysqldump -u root -p pandora> /backup/pandoradb_backup.sql
  
-</code>+</file>
  
-From a backup done that way, you may fully restore the database. Login in MySQL, proceed to create the database that will be restored and then load the backup in that database. Following the previous example:+From a backup done that way, you may fully restore the database. Login in MySQL, proceed to create the database that will be restored and then load the backup in that database. Following the previous example (replace ''mypassword'' with your password):
  
-そのようにして行われたバックアップから、データベースを完全に復元できます。MySQL にログインし、復元されるデータベースの作成に進み、そのデータベースにバックアップをロードします。前のファイルを例にすると、次のように実行します。+そのようにして行われたバックアップから、データベースを完全に復元できます。MySQL にログインし、復元されるデータベースの作成に進み、そのデータベースにバックアップをロードします。前のファイルを例にすると、次のように実行します(''mypassword'' を実際のパスワードに置き換えます)
  
-<code+<file
-[root@pandorafms ~]# mysql -u root -p +mysql -u root -p 
-mysqlcreate database pandora; +</file>
-mysql> use pandora; +
-mysql> source /backup/padnoradb_backup.sql+
  
 +<code sql>
 +CREATE DATABASE pandora;
 +USE pandora;
 +SOURCE /backup/pandoradb_backup.sql;
 +GRANT ALL privileges ON pandora.* TO pandora@localhost IDENTIFIED BY 'mypassword';
 +exit;
 </code> </code>
  
行 265: 行 228:
 最後に、Pandora FMS コンソールとサーバの両方で設定済みのユーザ権限を再度設定し、データベースへのアクセス権を付与します。(''mypassword'' をあなたのパスワードで置き換えてください) 最後に、Pandora FMS コンソールとサーバの両方で設定済みのユーザ権限を再度設定し、データベースへのアクセス権を付与します。(''mypassword'' をあなたのパスワードで置き換えてください)
  
-<code>+<code sql>
 grant all privileges on pandora.* to pandora@localhost identified by 'mypassword'; grant all privileges on pandora.* to pandora@localhost identified by 'mypassword';
  
 </code> </code>
 +
 +<wrap #ks5 />
  
 ===== Pandora FMS のバックアップとリカバリ ===== ===== Pandora FMS のバックアップとリカバリ =====
  
-There is a script in Pandora FMS server distribution that is useful to backup and restore Pandora FMS completely. This script is intended for backup and restoration in systems where the server and console are located in the same machine.+There is a script in the Pandora FMS server distribution that is used to make a backup and a complete restore of all Pandora FMS. This script is thought to make copies and restoration in systems // where the server and the console are located in the same machine//.
  
 Pandora FMS サーバの配布パッケージには、Pandora FMS を完全にバックアップおよび復元するのに役立つスクリプトがあります。 このスクリプトは、サーバとコンソールが同じマシン上にあるシステムでのバックアップと復元を目的としています。 Pandora FMS サーバの配布パッケージには、Pandora FMS を完全にバックアップおよび復元するのに役立つスクリプトがあります。 このスクリプトは、サーバとコンソールが同じマシン上にあるシステムでのバックアップと復元を目的としています。
  
-<WRAP center round tip 60%>+It is designed to backup and restore the following components: 
 + 
 +次のコンポーネントをバックアップおよび復元するように設計されています。 
 + 
 +  * Server configuration file(s). 
 +  * Files(s) **pending execution**, as well as **remote configuration** files of the agents. 
 +  * **Database**, complete. 
 +  * **Web Console**, complete. 
 + 
 +  * サーバ設定ファイル 
 +  * **実行保留中**のファイルと、エージェントの**リモート設定**ファイル。 
 +  * **データベース**全体 
 +  * **ウェブコンソール**全体 
 + 
 +<WRAP center round tip 90%>
  
-If there are several components in your environment, then you should use the tool with the most adequate parameters for its use or modify them so they are tailored to your needs.+If there are different components in the environment, you should use the tool with the most appropriate parameters for your use or modify them to suit the circumstances.
  
 </WRAP> </WRAP>
  
-<WRAP center round tip 60%>+<WRAP center round tip 90%>
  
 コンポーネントが複数に分かれた環境の場合は、適切なパラメーターでツールを使用するか、ニーズに合わせてツールを調整する必要があります。 コンポーネントが複数に分かれた環境の場合は、適切なパラメーターでツールを使用するか、ニーズに合わせてツールを調整する必要があります。
行 288: 行 267:
 </WRAP> </WRAP>
  
-This script needs to be executed as **root**. You are the only **responsible** for said key. It is located at:+This script needs to run as **root**. You are the only **responsible** for this key. It is located at:
  
-この処理を実行するには、スクリプトを root 権限で実行する必要があります。スクリプトは以下にあります。+この処理を実行するには、スクリプトを **root** 権限で実行する必要があります。スクリプトは以下にあります。
  
-<code>+<file>
 /usr/share/pandora_server/util/pandora_backup.sh /usr/share/pandora_server/util/pandora_backup.sh
  
-</code>+</file>
  
-If it is executed without parameters, it will show the help menu:+<WRAP center round tip 90%> 
 + 
 +When running it without any parameters, the help menu will be displayed. 
 + 
 +</WRAP> 
 + 
 +<WRAP center round tip 90%>
  
 引数無しで実行すると、ヘルプを表示します。 引数無しで実行すると、ヘルプを表示します。
 +
 +</WRAP>
 +
 +<wrap #ks6 />
 +
  
  
行 327: 行 317:
 #!/bin/bash #!/bin/bash
 sendsms +34458474843 "The Pandora FMS has suffered some issue and it cannot be started." sendsms +34458474843 "The Pandora FMS has suffered some issue and it cannot be started."
-/etc/init.d/tentacle_serverd stop+systemctl stop tentacle_serverd 
  
 </code> </code>
行 365: 行 356:
 ==== ヒストリデータベースの設定 ==== ==== ヒストリデータベースの設定 ====
  
-<WRAP center round info 75%>+To configure a historical database, it is necessary to have a new server where to host it (**different from the one of the main database**). Once you have that server where MySQL is installed, follow these steps:
  
-Version NG 754 and later versions{{:wiki:icono-modulo-enterprise.png?23x23|Enterprise version}}.+ヒストリデータベースを設定するには、それをホストする新しいサーバが必要です(**メインデータベースのサーバとは異なります**)。MySQL がインストールされているサーバを用意したら、次の手順に従います。
  
-</WRAP>\\+In Pandora FMS console, go to <wrap :en>**Management → Setup → Setup → Historical database**</wrap> to access [[:en:documentation:pandorafms:management_and_operation:12_console_setup#ks1_4|connection configuration]] (<wrap :en>**Configure connection target**</wrap>).
  
-<WRAP center round info 75%> +Pandora FMS コンソールで、**管理(Management) → セットアップ(Setup) → セットアップ(Setup) → ヒストリデータベース(Historical database)** へ行き、[[:ja:documentation:pandorafms:management_and_operation:12_console_setup#ヒストリデータベース|接続設定]] (**接続先設定(Configure connection target)**) にアクセスします。
-バージョン NG 754 およびそれ以降{{:wiki:icono-modulo-enterprise.png?23x23|Enterprise 版}} +
-</WRAP>\\ +
- +
-{{:wiki:icono-modulo-enterprise.png?23x23  |Versión Enterprise}}To configure a historical database, it is necessary to have a new server where to host it (**different from the one of the main database**). Once you have that server where MySQL is installed, follow these steps: +
- +
-{{:wiki:icono-modulo-enterprise.png?23x23  |Enterprise 版}}ヒストリデータベースを設定するには、それをホストする新しいサーバが必要です(**メインデータベースのサーバとは異なります**)。MySQL がインストールされているサーバを用意したら、次の手順に従います。 +
- +
-In Pandora FMS console, go to ►**Setup** → **Setup** → **Historical database** to access [[:en:documentation:04_using:12_console_setup#the_history_database|connection configuration]] (**Configure connection target**). +
- +
-Pandora FMS コンソールで、**セットアップ(Setup)** → **セットアップ(Setup)** → **ヒストリデータベース(Historical database)** へ行き、[[:ja:documentation:04_using:12_console_setup#ヒストリデータベース|接続設定]] (**接続先設定(Configure connection target)**) にアクセスします。 +
- +
-{{  :wiki:pandora_console_06.png  }}+
  
 Fill in the following fields: Fill in the following fields:
行 400: 行 379:
   * **データベースユーザ(Database user)**: ヒストリデータベースユーザ。デフォルトは ''pandora'' です。   * **データベースユーザ(Database user)**: ヒストリデータベースユーザ。デフォルトは ''pandora'' です。
   * **データベースパスワード(Dabase password)**: ヒストリデータベースのパスワード。これにより、ヒストリデータベースに接続できるようになります。 次に、カスタムパラメータを入力します(**設定のカスタマイズ**):   * **データベースパスワード(Dabase password)**: ヒストリデータベースのパスワード。これにより、ヒストリデータベースに接続できるようになります。 次に、カスタムパラメータを入力します(**設定のカスタマイズ**):
- 
-{{  :wiki:pandora_console_06-1.png  }} 
  
 The last fields of this form **Data days old to keep in active database, Transference block size (Step)**  and **Delay betewwn transferences (seconds)**  will define the way in which the data will be sent to the historical database, that is, the oldest data those with more than n //days (Data days)//  will be moved to the history database in blocks of made of n rows (//Step//) waiting n seconds (//Delay//) between one block and the next to avoid overloads. The last fields of this form **Data days old to keep in active database, Transference block size (Step)**  and **Delay betewwn transferences (seconds)**  will define the way in which the data will be sent to the historical database, that is, the oldest data those with more than n //days (Data days)//  will be moved to the history database in blocks of made of n rows (//Step//) waiting n seconds (//Delay//) between one block and the next to avoid overloads.
行 413: 行 390:
 <WRAP center round tip 75%> <WRAP center round tip 75%>
  
-{{:wiki:icono-modulo-enterprise.png?23x23  |Versión Enterprise}}The historical database is a feature of the Enterprise version that uses the ''/usr/bin/pandora_db''  binary to transfer data. In addition, you must configure the settings [[:en:documentation:04_using:12_console_setup#history_database_maintenance_options|for the maintenance of the history database]].+The historical database uses the ''/usr/bin/pandora_db''  binary to transfer data. In addition, you must configure the settings [[:en:documentation:pandorafms:management_and_operation:12_console_setup#history_database_maintenance_options|for the maintenance of the history database]].
  
 </WRAP> </WRAP>
  
 <WRAP center round tip 75%> <WRAP center round tip 75%>
-{{:wiki:icono-modulo-enterprise.png?23x23  |Enterprise 版}}ヒストリデータベースは、''/usr/bin/pandora_db'' バイナリを使用してデータを転送する Enterprise 版の機能です。加えて、[[:ja:documentation:04_using:12_console_setup#ヒストリデータベースメンテナンスオプション|ヒストリデータベースのメンテナンス]]設定を行う必要があります。+ 
 +ヒストリデータベースは、''/usr/bin/pandora_db'' バイナリを使用してデータを転送する Enterprise 版の機能です。加えて、[[:ja:documentation:pandorafms:management_and_operation:12_console_setup#ヒストリデータベースメンテナンスオプション|ヒストリデータベースのメンテナンス]]設定を行う必要があります。 
 </WRAP> </WRAP>
 +
 +[[ja:documentation:start|Pandora FMS ドキュメント一覧に戻る]]
 +
 +===== (OBSOLETE) =====
 +
 +====バックアップ元とバックアップ先オプション====
 +
 +This script obtains access credentials to the database directly from the WEB console configuration. That is why the full path with the ''-c'' must be sent to the WEB console. That same parameter is also used to back up the web console itself.
 +
 +このスクリプトは、ウェブコンソールの設定ファイルに設定されている DB のアクセス情報を利用します。そのため、ウェブコンソールの設定ファイルのパスを ''-c'' オプションで指定する必要があります。
 +このパラメータは、ウェブコンソールのバックアップを取得するためにも利用されます。
 +
 +The backup's **destination** is specified with the //-d// parameter. The compressed backup file will be lodged in that path, with a name similar to ''pandorafms_backup_xxxxxxx.tar.gz''.
 +
 +パックアップ**先**は、//-d// オプションで指定します。バックアップファイルが ''pandorafms_backup_xxxxxxx.tar.gz'' というファイル名で圧縮されて置かれます。
 +
 +そのようにして、次のコマンドは完全な環境バックアップを実行します。
 +
 +  /usr/share/pandora_server/util/pandora_backup.sh -c /var/www/html/pandora_console/ -d /tmp/
 +
 +With the ''-b'' parameter the database backup can be prevented:
 +
 +''-b'' オプションを付けるとデータベースのバックアップを行いません。
 +
 +  /usr/share/pandora_server/util/pandora_backup.sh -c /var/www/html/pandora_console/ -d /tmp/ -b
 +
 +====データベースリストア====
 +
 +To restore the database with the script, replace the parameter ''-d'' by ''-s'', indicating in this particular case the path to the backup:
 +
 +スクリプトでデータベースをリストアするには、パラメーター ''-d'' を ''-s'' に置き換えて、バックアップ先のパスを指定します。
 +
 +<code>
 +/usr/share/pandora_server/util/pandora_backup.sh -c /var/www/html/pandora_console/ -s /tmp/pandorafms_backup_2021-12-16-16-11-50.tar.gz
 +
 +</code>
 +
 +これは、ディレクトリを含まないデフォルトのリストアです。
 +
 +====データベースとディレクトリのリストア====
 +
 +The ''-f'' option allows restoring backup files (**overwriting the current ones**). Since overwritting current configuration files could have serious consequences, use ''-f'' if you want to do a backup recovery and you want it to restore all Pandora FMS files (console and server).
 +
 +''-f'' オプションを使用すると、バックアップファイルを復元できます(現在のファイルを上書きします)。 現在の設定ファイルを上書きすると深刻な結果になる可能性があるため、バックアップリカバリを実行し、すべての Pandora FMS のファイル(コンソールおよびサーバ)を復元する場合は、''-f'' を使用します。
 +
 +<code>
 +/usr/share/pandora_server/util/pandora_backup.sh -c /var/www/html/pandora_console/ -s /tmp/pandorafms_backup_2021-12-16-16-11-50.tar.gz -f
 +
 +</code>
 +
 +<WRAP center round important 60%>
 +//grant// コマンドを使って、データベースのユーザ権限の復元を忘れないようにしてください。
 +</WRAP>
 +
 +====ファイルのリストア(データベースではない)====
 +
 +Same as with the previous option, it is possible to restore only the files, without including the database. To do it, add the ''-b'' option to the previous execution.
 +
 +前のオプションと同じように、データベースを含めずにファイルのみを復元できます。 それを行うには、上記の実行例に ''-b'' オプションを追加します。
 +
 +<code>
 +/usr/share/pandora_server/util/pandora_backup.sh -c /var/www/html/pandora_console/ -s /tmp/pandorafms_backup_2021-12-16-16-11-50.tar.gz -f -b
 +
 +</code>
 +
 +
 +==== 利用例 ====
 +
 +===バックアップの作成===
 +
 +root で以下を実行します。
 +
 +<code>
 +/usr/share/pandora_server/util/pandora_backup.sh -c /var/www/html/pandora_console/ -d /tmp/
 +
 +</code>
 +
 +次のようなメッセージが表示されます。
 +
 +<code>
 +Backup completed and placed in /tmp//pandorafms_backup_2021-12-16-16-11-50.tar.gz
 +
 +</code>
 +
 +This means that the backup is at, in this case:
 +''/tmp/pandorafms_backup_2021-12-16-16-11-50.tar.gz''
 +
 +これは、バックアップが ''/tmp/pandorafms_backup_2021-12-16-16-11-50.tar.gz'' にできたことを意味します。
 +
 +===バックアップからのリストア===
 +
 +<WRAP center round info 60%>To restore the backup automatically, you need a console with the authentication credentials on the database correctly defined.</WRAP>
 +
 +<WRAP center round info 60%>自動でバックアップからリストアするために、コマンドラインからデータベースへアクセスできる権限が設定されていると仮定します。</WRAP>
 +
 +実行:
 +
 +<code>
 +/usr/share/pandora_server/util/pandora_backup.sh -c /var/www/html/pandora_console/ -s /tmp/pandorafms_backup_2021-12-16-16-11-50.tar.gz -f
 +
 +</code>
 +
 +次のような表示がされます。
 +
 +<code>
 + Detected Pandora FMS backup at /tmp/pandorafms_backup_2021-12-16-16-11-50.tar.gz, please wait...
 + Dropping current database
 + Restoring backup database
 + Restoring files and configuration
 + Done. Backup in /tmp/pandorafms_backup_2021-12-16-16-11-50.tar.gz restored
 +
 +</code>
 +
 +===コンソール障害時におけるバックアップからのリストア===
 +
 +Pandora FMS コンソールが障害により異常状態になった場合、このツールでバックアップを取得していれば、コンソールをリストアすることができます。そのためには、次のようにバックアップファイルを手動で展開します。
 +
 +<code>
 + cd /tmp
 + tar zxvf pandorafms_backup_2021-12-16-16-11-50.tar.gz
 +
 +</code>
 +
 +This will decompress your WEB console full directory in ''/tmp''. In case of the generated backup of the previous example, it creates a directory named:
 +
 +これより、ウェブコンソールのファイルが ''/tmp'' ディレクトリに展開されます。上記の例のバックアップの場合、次のようなディレクトリが作成されます。
 +
 +<code>
 +/tmp/var/www/html/pandora_console
 +
 +</code>
 +
 +このディレクトリ内の全てのファイルをウェブコンソールのディレクトリ (利用しているディストリビューションにより異なります) にコピーしてください。
 +
 +<code>
 +cp -R /tmp/var/www/html/pandora_console /var/www/html
 +
 +</code>
 +
 +以上でバックアップからリストアされ使えるようになります。
  
 ==== NG 753 およびそれ以前のバージョンにおけるヒストリデータベース ==== ==== NG 753 およびそれ以前のバージョンにおけるヒストリデータベース ====
行 620: 行 739:
  
 <WRAP center round tip 60%>この処理は、別のサーバの別のデータベースに対して実行されるため、メインのデータベースには影響を与えません。</WRAP> <WRAP center round tip 60%>この処理は、別のサーバの別のデータベースに対して実行されるため、メインのデータベースには影響を与えません。</WRAP>
- 
- 
- 
- 
-[[ja:documentation:start|Pandora FMS ドキュメント一覧に戻る]] 
- 
-===== (OBSOLETE) ===== 
- 
-====バックアップ元とバックアップ先オプション==== 
- 
-This script obtains access credentials to the database directly from the WEB console configuration. That is why the full path with the ''-c'' must be sent to the WEB console. That same parameter is also used to back up the web console itself. 
- 
-このスクリプトは、ウェブコンソールの設定ファイルに設定されている DB のアクセス情報を利用します。そのため、ウェブコンソールの設定ファイルのパスを ''-c'' オプションで指定する必要があります。 
-このパラメータは、ウェブコンソールのバックアップを取得するためにも利用されます。 
- 
-The backup's **destination** is specified with the //-d// parameter. The compressed backup file will be lodged in that path, with a name similar to ''pandorafms_backup_xxxxxxx.tar.gz''. 
- 
-パックアップ**先**は、//-d// オプションで指定します。バックアップファイルが ''pandorafms_backup_xxxxxxx.tar.gz'' というファイル名で圧縮されて置かれます。 
- 
-そのようにして、次のコマンドは完全な環境バックアップを実行します。 
- 
-  /usr/share/pandora_server/util/pandora_backup.sh -c /var/www/html/pandora_console/ -d /tmp/ 
- 
-With the ''-b'' parameter the database backup can be prevented: 
- 
-''-b'' オプションを付けるとデータベースのバックアップを行いません。 
- 
-  /usr/share/pandora_server/util/pandora_backup.sh -c /var/www/html/pandora_console/ -d /tmp/ -b 
- 
-====データベースリストア==== 
- 
-To restore the database with the script, replace the parameter ''-d'' by ''-s'', indicating in this particular case the path to the backup: 
- 
-スクリプトでデータベースをリストアするには、パラメーター ''-d'' を ''-s'' に置き換えて、バックアップ先のパスを指定します。 
- 
-<code> 
-/usr/share/pandora_server/util/pandora_backup.sh -c /var/www/html/pandora_console/ -s /tmp/pandorafms_backup_2021-12-16-16-11-50.tar.gz 
- 
-</code> 
- 
-これは、ディレクトリを含まないデフォルトのリストアです。 
- 
-====データベースとディレクトリのリストア==== 
- 
-The ''-f'' option allows restoring backup files (**overwriting the current ones**). Since overwritting current configuration files could have serious consequences, use ''-f'' if you want to do a backup recovery and you want it to restore all Pandora FMS files (console and server). 
- 
-''-f'' オプションを使用すると、バックアップファイルを復元できます(現在のファイルを上書きします)。 現在の設定ファイルを上書きすると深刻な結果になる可能性があるため、バックアップリカバリを実行し、すべての Pandora FMS のファイル(コンソールおよびサーバ)を復元する場合は、''-f'' を使用します。 
- 
-<code> 
-/usr/share/pandora_server/util/pandora_backup.sh -c /var/www/html/pandora_console/ -s /tmp/pandorafms_backup_2021-12-16-16-11-50.tar.gz -f 
- 
-</code> 
- 
-<WRAP center round important 60%> 
-//grant// コマンドを使って、データベースのユーザ権限の復元を忘れないようにしてください。 
-</WRAP> 
- 
-====ファイルのリストア(データベースではない)==== 
- 
-Same as with the previous option, it is possible to restore only the files, without including the database. To do it, add the ''-b'' option to the previous execution. 
- 
-前のオプションと同じように、データベースを含めずにファイルのみを復元できます。 それを行うには、上記の実行例に ''-b'' オプションを追加します。 
- 
-<code> 
-/usr/share/pandora_server/util/pandora_backup.sh -c /var/www/html/pandora_console/ -s /tmp/pandorafms_backup_2021-12-16-16-11-50.tar.gz -f -b 
- 
-</code> 
- 
- 
-==== 利用例 ==== 
- 
-===バックアップの作成=== 
- 
-root で以下を実行します。 
- 
-<code> 
-/usr/share/pandora_server/util/pandora_backup.sh -c /var/www/html/pandora_console/ -d /tmp/ 
- 
-</code> 
- 
-次のようなメッセージが表示されます。 
- 
-<code> 
-Backup completed and placed in /tmp//pandorafms_backup_2021-12-16-16-11-50.tar.gz 
- 
-</code> 
- 
-This means that the backup is at, in this case: 
-''/tmp/pandorafms_backup_2021-12-16-16-11-50.tar.gz'' 
- 
-これは、バックアップが ''/tmp/pandorafms_backup_2021-12-16-16-11-50.tar.gz'' にできたことを意味します。 
- 
-===バックアップからのリストア=== 
- 
-<WRAP center round info 60%>To restore the backup automatically, you need a console with the authentication credentials on the database correctly defined.</WRAP> 
- 
-<WRAP center round info 60%>自動でバックアップからリストアするために、コマンドラインからデータベースへアクセスできる権限が設定されていると仮定します。</WRAP> 
- 
-実行: 
- 
-<code> 
-/usr/share/pandora_server/util/pandora_backup.sh -c /var/www/html/pandora_console/ -s /tmp/pandorafms_backup_2021-12-16-16-11-50.tar.gz -f 
- 
-</code> 
- 
-次のような表示がされます。 
- 
-<code> 
- Detected Pandora FMS backup at /tmp/pandorafms_backup_2021-12-16-16-11-50.tar.gz, please wait... 
- Dropping current database 
- Restoring backup database 
- Restoring files and configuration 
- Done. Backup in /tmp/pandorafms_backup_2021-12-16-16-11-50.tar.gz restored 
- 
-</code> 
- 
-===コンソール障害時におけるバックアップからのリストア=== 
- 
-Pandora FMS コンソールが障害により異常状態になった場合、このツールでバックアップを取得していれば、コンソールをリストアすることができます。そのためには、次のようにバックアップファイルを手動で展開します。 
- 
-<code> 
- cd /tmp 
- tar zxvf pandorafms_backup_2021-12-16-16-11-50.tar.gz 
- 
-</code> 
- 
-This will decompress your WEB console full directory in ''/tmp''. In case of the generated backup of the previous example, it creates a directory named: 
- 
-これより、ウェブコンソールのファイルが ''/tmp'' ディレクトリに展開されます。上記の例のバックアップの場合、次のようなディレクトリが作成されます。 
- 
-<code> 
-/tmp/var/www/html/pandora_console 
- 
-</code> 
- 
-このディレクトリ内の全てのファイルをウェブコンソールのディレクトリ (利用しているディストリビューションにより異なります) にコピーしてください。 
- 
-<code> 
-cp -R /tmp/var/www/html/pandora_console /var/www/html 
- 
-</code> 
- 
-以上でバックアップからリストアされ使えるようになります。 
  
  • ja/documentation/pandorafms/installation/06_server_management.1715500298.txt.gz
  • 最終更新: 2024/05/12 07:51
  • by junichi