1. Home
  2. Knowledge Base
  3. Articles (EN/ES/FR)
  4. Migration from Centos7 to Ubuntu22

Migration from Centos7 to Ubuntu22

Make a copy of the database:

Stop all running processes except mysql.

/etc/init.d/pandora_server stop

/etc/init.d/pandora_agent_daemon stop

/etc/init.d/tentacle_serverd stop

service httpd stop

We perform the backup:

mysqldump -u root -p pandora> backup_pandora_bkp.sql

Make a backup copy of the directories /var/www/html/pandora_console/, /var/spool/data_in/ and in case you have customized plugins, also /usr/share/pandora_server/util/plugin; and also make a backup copy of the files /etc/pandora/pandora_server.conf and /etc/pandora/pandora_agent.conf .

After this, create your Ubunutu Server 22.04 and install Pandora FMS, we recommend you to use the same MYSQL server version, and Pandora FMS server and console version that you had in your previous system, or else the last supported LTS.

Installation script of the last version:

curl -SsL https://pfms.me/deploy-pandora-ubuntu | bash

Next, paste the backup copies of the previously mentioned directories (directory /var/www/html/pandora_console/attachment/, directory /var/spool/data_in/ and directory /usr/share/pandora_server/util/plugin) and files (/etc/pandora/pandora_server.conf and /etc/pandora/pandora_agent.conf), checking that they have the correct permissions.

After this, stop the services of your new machine, except mysql:

/etc/init.d/pandora_server stop

/etc/init.d/pandora_agent_daemon stop

/etc/init.d/tentacle_serverd stop

service httpd stop

Access mysql with root user. Access to Pandora FMS database, default user “pandora” and import the database.

#mysql -u root -ppandora

mysql>source /path of the backup file/backup_pandora_bkp.sql

You have to check if the old files …/pandora_console/include/config.php and /etc/pandora/pandora/pandora/pandora_server.conf and the new ones have the same data in their dbname, dbuser, dbpass fields.
In case they are different, you can copy the configuration from the old files to the new ones or give permissions to the database with the data of the new installation.

For example:

The new installation has this data: dbname=pandora, dbuser=pandora1 and dbpass=pandora2, it would be done like this:

#mysql -u root -ppandora

ALTER USER ""@'%' IDENTIFIED WITH mysql_native_password BY "";

mysql>grant all privileges on pandora.* to 'pandora1'@'localhost' identified by 'pandora2';

mysql>flush privileges;

Restart the services and you should have everything from the old installation.

Once the process is finished, you should assign the same IP to the new server so that all the software agents report to the new one.

Was this article helpful?

Related Articles

Need Support?

Can't find the answer you're looking for?
Contact Support