Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:documentation:02_installation:02_anexo_upgrade [2021/07/14 03:22]
jimmy.olano [Online updates] Estilo.
en:documentation:02_installation:02_anexo_upgrade [2023/05/16 08:31] (current)
Line 1: Line 1:
 ====== Upgrades and updates ====== ====== Upgrades and updates ======
 +
 {{indexmenu_n>2}} {{indexmenu_n>2}}
  
-[[en:documentation:start|Go back to Pandora FMS documentation index]]+[[:en:documentation:start|Go back to Pandora FMS documentation index]] 
 + 
 +===== Warp Update (Update Manager) ===== 
 + 
 +{{  :wiki:pfms-warp_update-engine.png?nolink&  }} 
 + 
 +From version 763, Pandora FMS will be able to check online whether there is an update and, upon request, download it and automatically update your Web Console. 
 + 
 +<WRAP center round info 60%> 
 + 
 +If you have version 762 (or earlier) installed, use [[:en:documentation:02_installation:02_anexo_upgrade#automatic_update_with_update_manager|Update Manager]]. 
 + 
 +</WRAP> 
 + 
 +This update has the following features: 
 + 
 +  * You will need to be [[:en:documentation:07_technical_annexes:15_security_architecture#keep_your_system_up_to_date|connected to the Internet]] from your Pandora FMS Console. 
 +  * **Warp Update**  will contact our servers to find the latest version available (on Sourceforge). It will send anonymous statistical usage data (number of Agents). 
 +  * Updates are the entire content of the Web Console, so the process can be quite long. 
 +  * The updates are automatic and in 99% of the cases it should work properly, although there is no guarantee that it will. 
 +  * You may also [[:en:documentation:02_installation:02_anexo_upgrade#warp_update_offline|update offline]] if the PFMS server to be updated is in a restricted and/or limited environment. 
 + 
 +==== Warp Update Online ==== 
 + 
 +In order to update through **Warp Update**  online, you must be registered. Enter your email and click **Ok!**: 
 + 
 +{{  :wiki:pfms-warp_update-warp_update_register.png  }} 
 + 
 +In a few seconds **Warp Update**  will connect to our servers and analyze what updates are needed. If it is up to date, it will show the active version in progress, without the need to carry out any other action. 
 + 
 +{{  :wiki:pfms-warp_update-warp_update_online.png  }} 
 + 
 +==== Warp Update Offline ==== 
 + 
 +[[https://pandorafms.com/en/prices/?o=dwpfms|{{:wiki:icono-modulo-enterprise.png?nolink&23x23  |Enterprise version}}]]For Enterprise environments you may upgrade offline. [[https://pandorafms.com/en/contact/|Contact the support department]] to download the files. 
 + 
 +Once downloaded, go to the menu ►**Warp Update** → **Warp Update Offline** and click ♦**Browse it** (there is also the option to drag and drop the file). 
 + 
 +{{  :wiki:pfms-warp_update-warp_update_offline.png  }} 
 + 
 +<WRAP center round important 60%> 
 + 
 +Applying offline patches may deem your console unusable, we recommend you to completely [[https://pandorafms.com/manual/en/documentation/07_technical_annexes/07_backup_and_restore_procedures|backup your files]] before applying any patches. 
 + 
 +</WRAP>\\ 
 +{{  :wiki:pfms-warp_update-warp_update_offline_example.png  }} 
 + 
 +You will see something similar to the previous image where the changes are listed, click on the green icon located on the lower right corner to continue. Your Pandora FMS server will be up to date. 
 + 
 +<WRAP center round important 90%> 
 + 
 +**Important**: If you upgrade offline from version 768 to 769 and use CentOS 7 with your PFMS server, set the ''memory_limit'' token to ''1G'' (one gigabyte) in the ''php.ini'' file. For example, you may use the following instruction: 
 +<code> 
 + 
 +sed -i -e "s/^memory_limit.*/memory_limit = 1G/g" /etc/php.ini 
 + 
 +</code> 
 + 
 +Save and restart the Apache service with ''systemctl restart httpd''
 + 
 +</WRAP> 
 + 
 + 
 +==== Warp Update Journal ==== 
 + 
 +Go to ►**Warp Update**  → **Warp Update Journal**  menu to find out the updates made, version, date and time of application, user who requested and applied it, etc. 
 + 
 +{{  :wiki:pfms-warp_update-warp_update_journal.png  }} 
 + 
 +Thoughout time many records will be accumulated, which you may filter by expanding the **Filter**  box and entering the keyword to search for. 
 + 
 +==== Warp Update Setup ==== 
 + 
 +The default values are useful in most cases, however they can be changed. 
 + 
 +<WRAP center round tip 60%> 
 + 
 +**Enterprise version**: [[https://pandorafms.com/en/contact/|Contact]] support before changing any of the following fields: 
 + 
 +  * **Warp Update URL**. 
 +  * **Use secured Warp Update**. 
 +  * **Proxy server**. 
 +  * **Proxy port**. 
 +  * **Proxy user**. 
 +  * **Proxy password**. 
 +</WRAP> 
 + 
 +{{  :wiki:pfms-warp_update-warp_update_setup.png  }}
  
 +  * **Allow no-consecutive patches**: It allows non-consecutive updates to be installed. Disabled by default and it is the recommended option.
 +  * **Limit to LTS updates**: It allows you to update only long-term versions (**LTS**).
 +When you finish entering the changes, save the values by clicking **Update**.
  
 ===== Manual Update ===== ===== Manual Update =====
Line 9: Line 100:
 It is important to understand the basic components in which Pandora FMS is divided. There are three main elements: console, server and database. It is important to understand the basic components in which Pandora FMS is divided. There are three main elements: console, server and database.
  
-{{ wiki:Pandora FMS standard design.png ?600 }}+{{  :wiki:pandora_fms_standard_design.png  }}
  
 In Opensource installations, these three components are quickly updated, but in **Enterprise**' installations the process will take a few more steps, since the components have extended Enterprise features that need to be updated separately. In Opensource installations, these three components are quickly updated, but in **Enterprise**' installations the process will take a few more steps, since the components have extended Enterprise features that need to be updated separately.
Line 21: Line 112:
   * Database.   * Database.
  
-As for **Enterprise** installations:+[[https://pandorafms.com/en/prices/?o=dwpfms|{{:wiki:icono-modulo-enterprise.png?23x23  |Enterprise version}}]]As for **Enterprise**  installations:
  
   * Open Web Console.   * Open Web Console.
Line 29: Line 120:
   * Database (additional charts of the Enterprise version).   * Database (additional charts of the Enterprise version).
  
-Updates  will **always** include console changes, **sometimes** server changes, and **once in a while** database changes. Let us organize the updates into two major categories: minor version upgrades, with **//no//** database changes, and major version upgrades, //**with**// database changes.+Updates will **always**  include console changes, **sometimes**  server changes, and **once in a while**  database changes. Let us organize the updates into two major categories: minor version upgrades, with **//no//**  database changes, and major version upgrades, //**with**//  database changes. More information can be found in the video tutorial «[[https://www.youtube.com/watch?v=8t2hvbM1zmM|How to update your Pandora FMS environment using RPM and Tarball packages]]». 
  
 ==== Update a minor version ==== ==== Update a minor version ====
Line 35: Line 127:
 These do not include any changes in the database, only in the console and sometimes in the server. E.g. updates 6.1 SP1 to 6.1 SP2. These do not include any changes in the database, only in the console and sometimes in the server. E.g. updates 6.1 SP1 to 6.1 SP2.
  
-Initial precautions: [[en:documentation:07_technical_annexes:07_backup_and_restore_procedures|here]] you have the detailed procedure to backup and restore Pandora MFS. However, here is a summary of the backup procedure:+Initial precautions: [[:en:documentation:07_technical_annexes:07_backup_and_restore_procedures|here]] you have the detailed procedure to backup and restore Pandora MFS. However, here is a summary of the backup procedure:
  
 1. Back up the database. E.g.: 1. Back up the database. E.g.:
 +<code>
  
-  mysqldump -u root -p pandora > backup_pandora_X.Y.sql+mysqldump -u root -p pandora> backup_pfms_X.Y.sql
  
-2. Back up the config files: ''pandora_server.conf'', ''config.php'' and ''pandora_agent.conf''.+</code>
  
-3. Back up server and agent plugins, at: +2. Back up the config files: ''pandora_server.conf'', ''config.php''  and ''pandora_agent.conf''
 + 
 +3. Back up server and agent plugins, at:
  
 <code> <code>
- /etc/pandora/plugins +/etc/pandora/plugins 
- pandora_console/attachment/plugin +pandora_console/attachment/plugin 
- /usr/share/pandora_server/util/plugin+/usr/share/pandora_server/util/plugin 
 </code> </code>
  
-4. Suspend the following services: ''pandora_server'', ''tentacle_serverd'', ''httpd'', ''pandora_agent'' and ''mysqld''.+4. Suspend the following services: ''pandora_server'', ''tentacle_serverd'', ''httpd'', ''pandora_agent''  and ''mysqld''.
  
 5. Proceed to update. 5. Proceed to update.
  
 === From RPM packages === === From RPM packages ===
 +
 +Go to [[https://firefly.pandorafms.com/pandorafms/|https://firefly.pandorafms.com/pandorafms/]] and download the version after the one you have installed.
  
   * Open console update:   * Open console update:
 +<code>
  
-  rpm -U pandorafms_console_package.rpm+rpm -U pandorafms_console*.rpm
  
-  * Enterprise console update:+</code>
  
-  rpm -U pandorafms_console_enterprise_package.rpm+  * [[https://pandorafms.com/en/prices/?o=dwpfms|{{:wiki:icono-modulo-enterprise.png?nolink&23x23  |Enterprise version}}]]Enterprise console update: 
 +<code>
  
-  * Open server update:+rpm -U pandorafms_console_enterprise_package.rpm
  
-  rpm -U pandorafms_server_package.rpm+</code>
  
-  * Enterprise server update with tar.gz:+  * Open server update:
  
 <code> <code>
- tar -xvzf pandorafms_server_enterprise_package.tar.gz +rpm -U pandorafms_server*.rpm 
- cd pandora_server +
- ./pandora_server_installer --install+
 </code> </code>
  
-You can find out which version you have installed at any time, before or after the installation by executing the command:+  * [[https://pandorafms.com/en/prices/?o=dwpfms|{{:wiki:icono-modulo-enterprise.png?nolink&23x23  |Enterprise version}}]]Enterprise server update with tar.gz: 
 +<code>
  
-  rpm -qa | grep -i pandora+tar -xvzf pandorafms_server_enterprise_package.tar.gz 
 +cd pandora_server 
 +./pandora_server_installer --install
  
-=== From DEB packages === +</code>
-  * Open console update:+
  
-  dpkg -i pandorafms_console_package.deb+  * Software Agent update:
  
-  Enterprise console update:+<code> 
 +rpm -U pandorafms_agent*.rpm
  
-  dpkg -i pandorafms_console_enterprise_package.deb+</code>
  
-  * Open server update:+You can find out which version you have installed at any time, before or after the installation by executing the command:
  
-  dpkg -i pandorafms_server_package.deb 
- 
-  * Enterprise server update: 
 <code> <code>
- tar zxvf pandorafms_server_enterprise_package.tar.gz +rpm -qa | grep -i pandora 
- cd pandora_server/ +
- ./pandora_server_installer --install+
 </code> </code>
  
-Before and after updating, you may find out the installed versions by executing this command:+{{:wiki:pfms-rpm-qa-grep-i-pandora.png?direct&  }}
  
-  rpm -qa | grep -i pandora 
  
 === From Tarball / Sources === === From Tarball / Sources ===
  
-  * Open console update:+Go to [[https://firefly.pandorafms.com/pandorafms/|https://firefly.pandorafms.com/pandorafms/]] and download the following version after the one you have installed.
  
 +  * Open Source console update:
 <code> <code>
- tar xvzf pandorafms_console_package.tar.gz 
- cd pandora_console 
- ./pandora_console_upgrade -p /yourconsolepath 
-</code> 
  
-  * Enterprise console update:+tar xvzf pandorafms_console_package.tar.gz 
 +cd pandora_console 
 +./pandora_console_upgrade -p /yourconsolepath 
 + 
 +</code>
  
 +  * [[https://pandorafms.com/en/prices/?o=dwpfms|{{:wiki:icono-modulo-enterprise.png?nolink&23x23  |Enterprise version}}]]Enterprise console update:
 <code> <code>
- tar xvzf pandorafms_console_enterprise_package.tar.gz + 
- cd pandora_console +tar xvzf pandorafms_console_enterprise_package.tar.gz 
- ./pandora_console_upgrade -p /yourconsolepath+cd pandora_console 
 +./pandora_console_upgrade -p /yourconsolepath 
 </code> </code>
  
-  * Open server update:+  * Open Source server update:
  
 <code> <code>
- tar xvzf pandorafms_server_package.tar.gz  +tar xvzf pandorafms_server_package.tar.gz 
- cd pandora_server +cd pandora_server 
- ./pandora_server_upgrade --upgrade+./pandora_server_upgrade --upgrade 
 </code> </code>
  
-  * Enterprise server update: +  * [[https://pandorafms.com/en/prices/?o=dwpfms|{{:wiki:icono-modulo-enterprise.png?nolink&23x23  |Enterprise version}}]]Enterprise server update:
 <code> <code>
- tar xvzf pandorafms_server_enterprise_package.tar.gz  + 
- cd pandora_server +tar xvzf pandorafms_server_enterprise_package.tar.gz 
- ./pandora_server_upgrade --upgrade+cd pandora_server 
 +./pandora_server_upgrade --upgrade 
 </code> </code>
  
-  * Agent update:+  * Software Agent update:
  
 <code> <code>
- tar xvzf pandorafms_agent_package.tar.gz +tar xvzf pandorafms_agent_package.tar.gz 
- cd pandora_agent +cd pandora_agent 
- ./pandora_agent_installer --force-install+./pandora_agent_installer --force-install 
 </code> </code>
 +
  
 === Version 7.0NG ( Rolling Release ) === === Version 7.0NG ( Rolling Release ) ===
  
-If you choose to update manually the Pandora FMS Console in version 7.0NG, (through ''rpm'', ''tarball'' or ''deb'') you may have to manually apply the migration scripts between the different versions. To avoid this situation, in version 7 it is always recommended to update the console using **Update Manager**.+If you choose to update manually the Pandora FMS Console in version 7.0NG, (through ''rpm'', ''tarball''  or ''deb'') you may have to manually apply the migration scripts between the different versions. To avoid this situation, in version 7 it is always recommended to update the console using **Update Manager**.
  
 In case of having an outdated database (a rare error that should not take place under normal circumstances), administrator users will see a warning on the notification tab indicating this problem: In case of having an outdated database (a rare error that should not take place under normal circumstances), administrator users will see a warning on the notification tab indicating this problem:
  
-{{ wiki:mr_message.png }}+{{  :wiki:mr_message.png  }}
  
 To solve this problem, enter the server where the Pandora FMS console is installed and go to the directory: To solve this problem, enter the server where the Pandora FMS console is installed and go to the directory:
  
-  /var/www/html/pandora_console/extras/mr+<code> 
 +/var/www/html/pandora_console/extras/mr
  
-There should be another directory located within labeled as ''updated''. All **sqls** that are already applied must be stored there, and those that are not must be stored outside. So once an **sql** is applied to the database, move them to the ''updated'' directory. +</code>
  
-''MR1'' execution will serve as exampleIn this case, there is no **MR** applied on the database and the ''MR0'' will appear in the footer of the Pandora FMS console. Version 704 has been manually installed and the ''MR1'' must be applied executing the ''sql'' found at '' /var/www/html/pandora_console/extras/mr/'' called ''1.sql''Execute it like this:+There should be another directory located within labeled as ''updated''All **sqls**  that are already applied must be stored there, and those that are not must be stored outside. So once an **sql**  is applied to the database, move them to the ''updated''  directory.
  
-  [[email protected] mr]# cat 1.sql | mysql -u root -p pandora+''MR1''  execution will serve as example. In this case, there is no **MR**  applied on the database and the ''MR0''  will appear in the footer of the Pandora FMS console. Version 704 has been manually installed and the ''MR1''  must be applied executing the ''sql''  found at '' /var/www/html/pandora_console/extras/mr/''  called ''1.sql''. Execute it like this:
  
-The MySQL user is ''root'' and the database is labeled as ''pandora''.+<code> 
 +[root@localhost mr]# cat 1.sql | mysql -u root -p pandora
  
-Once applied, update the **MR** value in the ''tconfig'' table of MySQL to change the footer value to the current one. Execute the following command once entered MySQL:+</code>
  
 +The MySQL user is ''root''  and the database is labeled as ''pandora''.
 +
 +Once applied, update the **MR**  value in the ''tconfig''  table of MySQL to change the footer value to the current one. Execute the following command once entered MySQL:
 <code> <code>
- mysql> use pandora; + 
- mysql> update tconfig set value= XX where token='MR';+mysql -u root -p pandora> use pandora;> update tconfig set value= XX where token='MR'; 
 </code> </code>
  
-Once done, the warning message will disappear from the Console and in the footer, the ''MR1'' will appear as applied. The next step is to move the sql to the ''updated'' folder. +Once done, the warning message will disappear from the Console and in the footer, the ''MR1''  will appear as applied. The next step is to move the sql to the ''updated''  folder.
  
-  [[email protected] mr]# mv 1.sql updated/+<code> 
 +[[email protected] mr]# mkdir -p updated 
 +[[email protected] mr]# mv 1.sql updated/ 
 + 
 +</code>
  
-To know which MRs should be applied, please go to the next [[en:documentation:08_technical_reference:10_versions| link.]]+To know which MRs should be applied, please go to the next [[:en:documentation:08_technical_reference:10_versions|link.]]
  
 ==== Major release update ==== ==== Major release update ====
  
 Major release updates always include database changes, so **you need to update your database schema**, e. g. updates from version 6.0 to 6.1; or 6.1 to 7.0. Major release updates always include database changes, so **you need to update your database schema**, e. g. updates from version 6.0 to 6.1; or 6.1 to 7.0.
 +
 +<WRAP center round info 90%>Always keep in mind that when upgrading from Pandora FMS version 6.0 **you will only be able to migrate up to version 7.0 NG 759**. From there you will have to keep upgrading to successive versions (consult the PFMS [[:es:documentation:08_technical_reference:10_versions|version history]] to apply the corresponding MR's after you have migrated to version 759).</WRAP>
  
 === Database updates ("Major releases") === === Database updates ("Major releases") ===
  
-In order to update the database, first update the Open or Enterprise console, depending on your version. These updates allow the necessary **sql** files to be downloaded.+In order to update the database, first update the Open or Enterprise console, depending on your version. These updates allow the necessary **sql**  files to be downloaded.
  
-Once the console is up to date, the **sql** scripts of the database update  can be found in ''/extras'' or ''/enterprise'' (again, depending on your version) on the console. On a standard CentOS installation they can be found at:+Once the console is up to date, the **sql**  scripts of the database update can be found in ''/extras''  or ''/enterprise''  (again, depending on your version) on the console. On a standard CentOS installation they can be found at: 
 +<code> 
 + 
 +/var/www/html/pandora_console/extras/pandoradb_migrate_X.Y_to_Z.T.mysql.sql 
 + 
 +</code>
  
 <code> <code>
- /var/www/html/pandora_console/extras/pandoradb_migrate_X.Y_to_Z.T.mysql.sql +/var/www/html/pandora_console/enterprise/pandoradb_migrate_vX.Y_to_vZ.T.mysql.sql 
- /var/www/html/pandora_console/enterprise/pandoradb_migrate_vX.Y_to_vZ.T.mysql.sql+
 </code> </code>
  
 Before updating, it is recommended to follow the precautions described above: back up the database and the config files, and suspend the Pandora FMS server: Before updating, it is recommended to follow the precautions described above: back up the database and the config files, and suspend the Pandora FMS server:
  
-  service pandora_server stop+<code> 
 +service pandora_server stop 
 + 
 +</code>
  
   * Open database update:   * Open database update:
  
-  mysql -u username -p -D databasename+<code> 
 +mysql -u username -p -D databasename 
 + 
 +</code>
  
 E. g.: E. g.:
  
-  mysql -u pandora -p -D pandora +<code> 
 +mysql -u pandora -p -D pandora 
 + 
 +</code>
  
 Execute the following from MySQL command-line: Execute the following from MySQL command-line:
  
-  source /yourconsolepath/extras/pandoradb_migrate_X.Y_to_Z.T.mysql.sql;+<code> 
 +source /yourconsolepath/extras/pandoradb_migrate_X.Y_to_Z.T.mysql.sql;
  
-<WRAP center round tip 60%> +</code> 
-When executing the Open version migration, the Enterprise version will also be updated. + 
-</WRAP>+<WRAP center round tip 60%> When executing the Open version migration, the Enterprise version will also be updated. </WRAP>
  
 To exit the MySQL client, execute ''quit''. The database is now updated to the correct version. To exit the MySQL client, execute ''quit''. The database is now updated to the correct version.
Line 220: Line 352:
  
 <code> <code>
- mysql -u username -p databasename +mysql -u username -p databasename> drop database databasename;> create database newdatabasename; 
- > drop database databasename; +> use newdatabasename; 
- > create database newdatabasename; +> source backup_pfms_X.Y.sql 
- > use newdatabasename; +
- > source backup_pandora_X.Y.sql+
 </code> </code>
  
Line 230: Line 361:
  
 <code> <code>
- mysql -u root -p pandora +mysql -u root -p pandora> drop database pandora;> create database pandora; 
- > drop database pandora; +> use pandora; 
- > create database pandora; +> source backup_pfms_X.Y.sql; 
- > use pandora; +
- > source backup_pandora_X.Y.sql;+
 </code> </code>
  
 ===== Automatic update with Update Manager ===== ===== Automatic update with Update Manager =====
 +
 +{{  :wiki:pfms-update-and-forward.png?nolink&  }}
 +
 +More information can be found in the video tutorial «[[https://www.youtube.com/watch?v=sbgsefQXHxA|Update Manager |Pandora FMS|]]».
  
 ==== OpenSource updates ==== ==== OpenSource updates ====
  
-From version 4.0.2 onwards, Pandora FMS (Opensource version) allows semi-automatic weekly updates, based on improvements in the **Update Manager** system (previously exclusive to Enterprise).  It allows an online query to be carried out, to find out if there is an update available and, if so, download it and automatically update the console.+From version 4.0.2 onwards, Pandora FMS (Opensource version) allows semi-automatic weekly updates, based on improvements in the **Update Manager**  system (previously exclusive to Enterprise). It allows an online query to be carried out, to find out if there is an update available and, if so, download it and automatically update the console.
  
 Updates feature the following characteristics: Updates feature the following characteristics:
  
-  * An outgoing Internet connection from the Pandora FMS console is necessary. +  * An [[:en:documentation:07_technical_annexes:15_security_architecture#keep_your_system_up_to_date|outgoing Internet connection]] from the Pandora FMS console is necessary. 
-  * **Update manager** contacts our servers to find the latest version available (in Sourceforge). It sends statistical data on the number of agents used (the data is anonymous). +  * **Update manager**  contacts our servers to find the latest version available (in Sourceforge). It sends statistical data on the number of agents used (the data is anonymous).
   * It downloads the update from Sourceforge, from the directory of weekly updates.   * It downloads the update from Sourceforge, from the directory of weekly updates.
   * Weekly updates are not incremental, but the total content for the console, which means the download process could take a while (packet size is approximately 25MB).   * Weekly updates are not incremental, but the total content for the console, which means the download process could take a while (packet size is approximately 25MB).
   * Updates are automatic: they are not checked by the team, and cannot be guaranteed. However, in 99% of cases they present no issues.   * Updates are automatic: they are not checked by the team, and cannot be guaranteed. However, in 99% of cases they present no issues.
-  * Updates are **only** for the console, not for agents or server.+  * Updates are **only**  for the console, not for agents or server.
  
 === Console update process === === Console update process ===
  
-It is fairly simple. Go to **Update manager** → **Update manager online**. On the main screen you will see if there are any pending or available updates, plus the latest console version.+It is fairly simple. Go to **Update manager**  → **Update manager online**. On the main screen you will see if there are any pending or available updates, plus the latest console version.
  
 {{  :wiki:um_online_open_actualizar_es.png  }} {{  :wiki:um_online_open_actualizar_es.png  }}
  
-If there is any update, click **Ok** to install it. After downloading the package, a dialog will appear with the option to accept or reject the update.+If there is any update, click **Ok**  to install it. After downloading the package, a dialog will appear with the option to accept or reject the update.
  
 {{  :wiki:dialog_um_principal_es.png  }} {{  :wiki:dialog_um_principal_es.png  }}
  
-Click **Ok** to begin the installation process.+Click **Ok**  to begin the installation process.
  
 Some updates contain database modifications. The update process launches a dialog to inform about these changes, as in the following screenshot: Some updates contain database modifications. The update process launches a dialog to inform about these changes, as in the following screenshot:
Line 275: Line 409:
  
 {{  :wiki:um_online_open_finalizado.png  }} {{  :wiki:um_online_open_finalizado.png  }}
- 
  
 ==== Enterprise updates ==== ==== Enterprise updates ====
Line 289: Line 422:
 === Configuration === === Configuration ===
  
-{{wiki:icono-modulo-enterprise.png }}+{{:wiki:icono-modulo-enterprise.png  }}
  
-To be able to use **Update Manager** in the Enterprise version, first the updater must be correctly configured, which has its own section in the menu:+To be able to use **Update Manager**  in the Enterprise version, first the updater must be correctly configured, which has its own section in the menu:
  
-{{ wiki:Opciones_um_es.png?700 }}+{{  :wiki:opciones_um_es.png?700  }}
  
 === Online updates === === Online updates ===
Line 312: Line 445:
  
 After, the updater will appear with the current version installed on Pandora FMS. After, the updater will appear with the current version installed on Pandora FMS.
- 
  
 === Offline updates === === Offline updates ===
  
-Offline Pandora FMS updates can also be downloaded, which have ''.OUM'' extensions. Go to the official Pandora FMS support page to download them.+{{:wiki:icono-modulo-enterprise.png?23x23  |Enterprise version}}Offline Pandora FMS updates can also be downloaded, which have ''.OUM''  extensions. Go to the official Pandora FMS support page to download them.
  
 Upload them to the console with the following control: Upload them to the console with the following control:
  
-{{ wiki:Um_offline_pag_principal_es.png?700 }}+{{  :wiki:um_offline_pag_principal_es.png  }}
  
 Once uploaded, the file will appear. We can click on it to start the update. Once uploaded, the file will appear. We can click on it to start the update.
  
-{{ wiki:Um_offline_pag_principal_cargado_es.png?560 }}+{{  :wiki:um_offline_pag_principal_cargado_es.png  }}
  
-The update follows the same operation flow as online downloads, displaying the corresponding console and database update dialogs, if there are any changes to be applied there. +The update follows the same operation flow as online downloads, displaying the corresponding console and database update dialogs, if there are any changes to be applied there.
  
-<WRAP center round tip 60%> +<WRAP center round tip 60%> The Pandora FMS Console can be updated in the same way as with the OUMs, using zip files created by our team. </WRAP>
-The Pandora FMS Console can be updated in the same way as with the OUMs, using zip files created by our team. +
-</WRAP> +
- +
-<WRAP center round important 60%> +
-In case of updating an installation with High Availability (HA), it will be necessary to take into account what is indicated in [[en:documentation:05_big_environments:06_ha#update|this section]]. +
-</WRAP>+
  
 +<WRAP center round important 60%> In case of updating an installation with High Availability (HA), it will be necessary to take into account what is indicated in [[:en:documentation:05_big_environments:06_ha#update|this section]]. </WRAP>
  
 ==== Additional PHP engine configuration for Update Manager ==== ==== Additional PHP engine configuration for Update Manager ====
Line 342: Line 469:
  
 The line is: The line is:
 +<code>
  
-<code> 
 memory_limit = 800M    ; Maximum amount of memory a script may consume memory_limit = 800M    ; Maximum amount of memory a script may consume
  
 </code> </code>
  
-To find out the location of the file ''php.ini'' execute:+To find out the location of the file ''php.ini''  execute: 
 <code> <code>
 php -i | grep php.ini php -i | grep php.ini
Line 356: Line 484:
 Also, depending on Pandora FMS version you have installed, you may get the information to update to version PHP 7 [[:en:documentation:07_technical_annexes:14_php_7|here]]. Also, depending on Pandora FMS version you have installed, you may get the information to update to version PHP 7 [[:en:documentation:07_technical_annexes:14_php_7|here]].
  
 +==== Migrating to another system ====
  
-===== Migrating to another system =====+There can be many reasons to move a PFMS server and its Web Console, which are usually on the same machine, real or virtual.
  
-You may want to use a new Pandora FMS version in another different or newer system or distribution, for example, migrating from a CentOS 6 to 8 or from RHEL to CentOS.+//**Possible examples:**  //
  
-1Back up the previous system's database:+  * A new version of Pandora FMS may require a different operating system, for example, migrating from CentOS 7 to Rocky Linux 8 or from CentOS 8 to RedHat Enterprise (RHEL) 8. 
 +  * It could also be the case of switching from one web service provider to anotherless data is used by Pandora FMS than making an image of the entire operating system. 
 +  * In case of audits or to test new features, it is necessary to have a copy of the main server.
  
 +**Procedure:**
 +
 +Note: Generally the full path to the PFMS Web Console is ''/var/www/html/pandora_console''  and in the following instructions it is abbreviated as ''$CONSOLE_PATH''  .
 +
 +**1.-**  Make a backup of the database of the previous system. There are several steps, open a terminal window with administrator rights (//root//  user):
 +
 +  * Start by making a logical copy of the database with the following command:
 <code> <code>
-mysqldump -u root -p pandora> backup_pandora_X.Y.sql+ 
 +mysqldump --single-transaction --max_allowed_packet=512M -u root -p pandora> backup_pandora_X.Y.sql
  
 </code> </code>
  
-2Install the new Pandora FMS system from scratchor [[https://pandorafms.com/community/get-started/|download]] it directly from Pandora FMS ISO and install it.+  * The resulting file ( ''backup_pandora_X.Y.sql''  ) will be compressed with the following data in order to have a single file for the migration. For example ''backup_pandora_X.Y.tar.gz''  compressed format which preserves the intrinsic values of each file. 
 +  * Compress all existing configuration files in the directory ''/etc/pandora/*.conf'' 
 +  * Compress the entire directory and subdirectories of ''$CONSOLE_PATH/attachment/'' 
 +  * Custom images and icons in ''$CONSOLE_PATH/images/''  , if any. 
 +  * Compress the whole directory ''/var/spool/pandora/data_in/'' 
 +  * Compress all [[:en:documentation:08_technical_reference:05_anexo_server_plugins_development|server plugins]] located at ''/usr/share/pandora_server/util/plugin/''  . If you have some server plugin(s) located at another directory that is not indicated, you should also compress them. 
 +  * Compress all dependencies installed on the source server, which are necessary for the correct operation of scripts / plugins installed on the source server and are not found on the target server. **Advanced systems will need to fully install the Integrated Development Environment**  (**IDE**). 
 +  * Compress all SSL certificates and custom Apache web server configuration located in ''/etc/httpd/'', if any file(s) exist.
  
-3Then, send or copy the ''backup_pandora_X.Y.sql'' file from the old system to the new one.+<WRAP center round important 60%> You are the only person responsible for safeguarding your dataWrite down on pen and paper the procedure you will choose for migrating data**Be careful**, use redundancy in backups and procedures with several people to assist you in the process </WRAP>
  
-4. Close all running processes except for MySQL. Start by Pandora FMS:+**2.-**  Install the new Pandora FMS system from scratch, the [[:en:documentation:02_installation:01_installing#online_installation_tool|online installation tool]] is recommended. 
 + 
 +**3.-**  Close all the processes running in the new system, except **mysql**; start with Pandora FMS (from version NG 754 onwards, you have [[:en:documentation:05_big_environments:07_server_management#manual_startupshutdown_for_pandora_fms_servers|additional options]] in the manual for starting and stopping HA High Availability Environments):
 <code> <code>
  
Line 381: Line 529:
 </code> </code>
  
-<WRAP center round tip 60%>\\ +**4.-**  Stopping the Apache server will depend on the distribution you are using:
-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>\\ +
-5. Stopping the Apache server will depend on the distribution used: +
-<code>+
  
 +<code>
 /etc/init.d/apache2 stop /etc/init.d/apache2 stop
  
Line 401: Line 546:
 </code> </code>
  
-6. Enter **MySQL** as root user. Access Pandora FMS database on the new system (¨pandora¨ by defaultand import the database.+**5.-**  Then send or copy, in the easiest way, the ''backup_pandora_X.Y.tar.gz''  file from the old system to the new one. Unzip the files in their corresponding places. 
 + 
 +**6.-**  Enter **mysql**  with //root//  user. Access Pandora FMS database in the new systemby default ''pandora''  and import the database. 
 <code> <code>
  # mysql -u root -p  # mysql -u root -p
  mysql>use pandora  mysql>use pandora
  Database changed  Database changed
- mysql>source /home/<your_user>/backup_pandora_X.Y.sql+ mysql>source ~/backup_pandora_X.Y.sql
  
 </code> </code>
  
-This path will vary depending on the directory where the backup is stored.+//This path will vary depending on the directory where you have the backup of the previous system, //here it is assumed that you have it in your home directory (''$HOME'').
  
-7. In case of migrating to a higher version, where the database structure changes, this would be the time to run the migration scripts as indicated in the major version update procedure.+**7.-**  In the case of a migration to a major version, where the database structure changes, this would be the time to run the migration scripts as indicated in the [[:en:documentation:02_installation:02_anexo_upgrade#major_release_update|major version upgrade procedure]].
  
-8. If you changed the distribution, keep in mind the console ''PATH'' also changed and some database fields will be different, such as **tconfig** ''attachment_store'' and ''fontpath''. To modify these fields, enter these queries. In the example you can see what a migration to CentOS would look like. For other distributionschange the Apache directory ''path''.+**8.- **If you made a distribution changeplease note that the ''PATH''  of the Web Console has been modified and in that case there are some fields in the database that have also been modified, such as the ''tconfig ''table and its ''attachment_store''  and ''fontpath''  fields. To modify these fields, enter these queries. The example is for a migration to Rocky Linux 8; in other distributions change the Apache directory ''path''.
 <code> <code>
- #mysql -u root -p + 
- mysql>use pandora +# mysql -u root -p> use pandora; 
- Database changed +  Database changed> UPDATE tconfig SET value = '/var/www/html/pandora_console/attachment' WHERE token LIKE 'attachment_store';> UPDATE tconfig SET value = '/var/www/html/pandora_console/include/fonts/smallfont.ttf' WHERE token LIKE 'fontpath';
- mysql>UPDATE tconfig SET value = '/var/www/html/pandora_console/attachment' WHERE token LIKE 'attachment_store' +
- mysql>UPDATE tconfig SET value = '/var/www/html/pandora_console/include/fonts/smallfont.ttf' WHERE token LIKE 'fontpath'+
  
 </code> </code>
  
-Keep these ''PATHS'' in mind in server and console configuration files (''config.php'' and ''pandora_server.conf'')+//These //''PATH''  //s must also be taken into account in server and console configuration files//  ( ''config.php''  ''pandora_server.conf''  ).
  
-9. Once the database is migrated, check that the previous ''…/pandora_console/include/config.php'' and ''/etc/pandora/pandora_server.conf'' files and the new ones contain the same data in the ''dbname'', ''dbuser'' and ''dbpass'' fieldsIf they are the same there is no need to do anything. If not, do one of these two things:+**9.-**  Once the database has been migrated, they should check whether the files ''…/pandora_console/include/config.php''  and ''/etc/pandora/pandora_server.conf''  and the new ones have the same data in the fields ''dbname'', ''dbuser''  and ''dbpass''.
  
-a. Replace the new files with the old ones or replace the data of the new files for the old ones. +  * //If they are the same, go to //**step 10**//.// 
- +  * If different, choose only one of the following options: 
-b. Give the database permissions with the data from the new installation. E. g. with the following datadbname=pandora, dbuser=pandora1 and dbpass=pandora2, it would be like this:+      * Option ( a ): Replace the new files with the old ones
 +      * Option ( b ): Copy data ( ''dbname'', ''dbuser''  and ''dbpass'' of the old files into the new ones. 
 +      * Option ( c ): Give permissions to the database with the data of the new installation. Assuming that the new installation has these data: ''dbname=pandora''''dbuser=pandora1''  and ''dbpass=pandora2''the example takes this form:
  
 <code> <code>
- #mysql -u root -p +# mysql -u root -p> grant all privileges on pandora.* to 'pandora1'@'localhost' identified by 'pandora2';> flush privileges;
- mysql>grant all privileges on pandora.* to 'pandora1'@'localhost' identified by 'pandora2'; +
- mysql>flush privileges;+
  
 </code> </code>
  
-Restart the daemons and access Pandora FMS consoleincluding all agentsmodules, alerts, etc. already configured and, if you replace the IP of the new host by the previous one, all the local agents will report to the new system.+**10.-**  After this, start all the [[:en:documentation:01_understanding:03_glossary#pandora_fms_glossary_of_terms|daemons]] again and you will be able to access Pandora FMS Consolewith all the AgentsModules, alerts, etc.
  
-If it is the Enterprise versionfollow the same procedure.+**11.-**  If you changed the IP address or URL on the new hostall **local**  Agents will report to this new system. For the Software Agents modify the [[:en:documentation:02_installation:05_configuration_agents#server_ip|server_ip]] parameter in each of them.
  
 +**12.-**  Use, in [[:en:documentation:05_big_environments:01_massive_operations#massive_operationsagents|Bulk Operations, agent editing]] to finalize any pending details.
  
-===== Update to a previous version =====+<WRAP center round info 60%> \\ If it is the Enterprise version, follow the same procedure. \\ </WRAP>
  
-To be able to update your software to a previous version, downgrade Pandora FMS console. As a precaution, it is recommended to back up the database and Pandora FMS configuration file as shown previouslyThe Open package must always be installed first and the Enterprise version afterwards.+===== Downgrade ===== 
 + 
 +In order to perform [[:en:documentation:01_understanding:03_glossary#downgrade|downgrade]]all you have to do is downgrade the version of the Pandora FMS **Web Console**. As a precaution, it is recommended to make a backup copy of the Pandora FMS database and configuration files, as explained in previous sectionsYou will always have to install the **Open Source**  package and then the **Enterprise**  version.
  
 ==== From RPM packages ==== ==== From RPM packages ====
  
-  * Open console update:+  * Open Source console update:
  
-  rpm -i --force pandorafms_console_package.rpm+<code> 
 +rpm -i --force pandorafms_console_package.rpm 
 + 
 +</code>
  
   * Enterprise console update:   * Enterprise console update:
  
-  rpm -i --force pandorafms_console__enterprise_package.rpm+<code> 
 +rpm -i --force pandorafms_console__enterprise_package.rpm 
 + 
 +</code> 
  
 ==== From Tarball/Sources ==== ==== From Tarball/Sources ====
  
-  * Open console update:+  * Open Source console update: 
 <code> <code>
- tar -xvzf pandorafms_console_package.tar.gz +tar -xvzf pandorafms_console_package.tar.gz 
- mv –f ./pandora_console/* /yourconsolepath+mv --force ./pandora_console/* /yourconsolepath 
 </code> </code>
  
   * Enterprise console update:   * Enterprise console update:
 +
 <code> <code>
- tar -xvzf pandorafms_console_package.tar.gz +tar -xvzf pandorafms_console_package.tar.gz 
- mv -./enterprise /yourconsolepath+mv --force ./enterprise /yourconsolepath 
 </code> </code>
 +
 +
ºº