Welcome to Pandora FMS Community › Forums › Community support › Advanced troubleshooting › Unable to restore pandora backups
-
Unable to restore pandora backups
Posted by soviet9922 on December 23, 2013 at 19:17Hi i have a pandora server installed and running “Centos based appliance 5.0sp1 x64” i like to migrate this server configuration to a new one, so i installed the same version on this server only difference is that is 32 bit appliance.
I followed the documentation guide:
“http://wiki.pandorafms.com/index.php?title=Pandora:Documentation_en:Server_Management#Backup_and_Complete_Recovery_of_Pandora_FMS”
Also tried using the document describing manual backup and restore (dump database reload database and copy console).
The problem is that after restoring the configuration in the new server pandora service seems to start ok, but i cannot access pandora console anymore if i connecto to port 80 i get the apache test page, but if i go to https pandora console dosen’t load.Somebody can point me how to fix this issue or theres some other way i can move my configuration to a new server ?.
Thanks.Mario replied 11 years, 1 month ago 3 Members · 8 Replies -
8 Replies
-
::
Follow these checkpoints to find what could be the problem.
1. Check permissions in HTML publishing directory /var/www/html/pandora_console, should be apache ownership for all files. If not, chown -R apache * and try again.
2. Check if you can login with “pandora” mysql user with password provided in /var/www/html/pandora_console/include/config.php:
mysql -u pandora -D pandora -p
If not, check what happened there.
3. Chechk for errors at //var/www/html/pandora_console/pandora_console.log
Good luck !
-
::
Thanks for the reply, apache permissions look ok on /var/www/html/pandora_console just in case i overwrite them to apache:apache but this don’t seem to fix the issue. Also i looked for pandora_console.log but i can’t find it on the drive.
Cheked mysql pandora user and i can connect and do querys fine.This problem seem to happen on any tests i done on diferent system this means that in case of having a pandora installation fail you cannot restore from a backup. Look like a important issue for pandora.
Also this forum have the most annoying captcha ever developed.
-
::
Thanks for the reply, apache permissions look ok on /var/www/html/pandora_console just in case i overwrite them to apache:apache but this don’t seem to fix the issue. Also i looked for pandora_console.log but i can’t find it on the drive.
Cheked mysql pandora user and i can connect and do querys fine.This problem seem to happen on any tests i done on diferent system this means that in case of having a pandora installation fail you cannot restore from a backup. Look like a important issue for pandora.
Also this forum have the most annoying captcha ever developed.
Sorry for the capcha, we’re besieged by spammers.
The backup recovery is something very commonly used, this usually works. Something “weird” is happening in your console and/or the procedure you’re using. pandora_console.log is where the console output any error. If you don’t have any clue there, checkout /var/log/httpd/error_log for anything suspicious.
by the way, just to be sure, do the chown -R (recursive), the most critical file there is include/config.php if doesnt have the correct permissions, it won’t run.
-
::
The file pandora_console.log don’t exists i search it on the disk.
Also the permissions of config.php seem to be ok. I applied apache owner and group permissions recursively as you sugested.
This is what i got on pandora logs.********************************************************************************************************
pandora_server.error
********************************************************************************************************
2013-12-24 11:50:31 – pandora_mon.inswitch.us Starting Pandora FMS Server. Error logging activated.
DBD::mysql::st execute failed: MySQL server has gone away at /usr/lib/perl5/PandoraFMS/DB.pm line 573.
DBD::mysql::st execute failed: MySQL server has gone away at /usr/lib/perl5/PandoraFMS/DB.pm line 597.
DBD::mysql::st execute failed: MySQL server has gone away at /usr/lib/perl5/PandoraFMS/DB.pm line 621.
Use of uninitialized value $task in delete at /usr/lib/perl5/PandoraFMS/ProducerConsumerServer.pm line 186.
Use of uninitialized value $task in delete at /usr/lib/perl5/PandoraFMS/ProducerConsumerServer.pm line 186.
Use of uninitialized value in delete at /usr/lib/perl5/PandoraFMS/ProducerConsumerServer.pm line 186.
Use of uninitialized value in delete at /usr/lib/perl5/PandoraFMS/ProducerConsumerServer.pm line 186.
Use of uninitialized value $task in delete at /usr/lib/perl5/PandoraFMS/ProducerConsumerServer.pm line 186.
Use of uninitialized value $task in delete at /usr/lib/perl5/PandoraFMS/ProducerConsumerServer.pm line 186.
Use of uninitialized value in delete at /usr/lib/perl5/PandoraFMS/ProducerConsumerServer.pm line 186.
Use of uninitialized value in delete at /usr/lib/perl5/PandoraFMS/ProducerConsumerServer.pm line 186.
Use of uninitialized value $task in delete at /usr/lib/perl5/PandoraFMS/ProducerConsumerServer.pm line 186.
Use of uninitialized value $task in delete at /usr/lib/perl5/PandoraFMS/ProducerConsumerServer.pm line 186.
Use of uninitialized value in delete at /usr/lib/perl5/PandoraFMS/ProducerConsumerServer.pm line 186.
Use of uninitialized value in delete at /usr/lib/perl5/PandoraFMS/ProducerConsumerServer.pm line 186.
DBD::mysql::st execute failed: MySQL server has gone away at /usr/lib/perl5/PandoraFMS/DB.pm line 621.
Thread 11 terminated abnormally: DBD::mysql::st execute failed: MySQL server has gone away at /usr/lib/perl5/PandoraFMS/DB.pm line 621.
DBD::mysql::db do failed: MySQL server has gone away at /usr/lib/perl5/PandoraFMS/DB.pm line 811.
DBD::mysql::db do failed: MySQL server has gone away at /usr/lib/perl5/PandoraFMS/DB.pm line 811.
DBD::mysql::db do failed: MySQL server has gone away at /usr/lib/perl5/PandoraFMS/DB.pm line 811.
Perl exited with active threads:
    5 running and unjoined
    5 finished and unjoined
    0 running and detached*****************************************************************************************************
pandora_server.log
*****************************************************************************************************
2013-12-24 10:20:16 pandora_mon.inswitch.us [V1] Pandora FMS Server ‘pandora_mon.inswitch.us’ unhandled error.
2013-12-24 11:50:31 pandora_mon.inswitch.us [V1] Launching 5.0SP1 131120
2013-12-24 11:50:31 pandora_mon.inswitch.us [V1] Config options: Logfile at /var/log/pandora/pandora_server.log, Basepath is /etc/pandora/pandora_server.conf, Checksum is 0, Master is 1, SNMP Console is 0, Server Threshold at 5 sec, verbosity at 1, Alert Threshold at 60, ServerName is ‘pandora_mon.inswitch.us’
2013-12-24 11:50:31 pandora_mon.inswitch.us [V1]Â- Pandora FMS Enterprise module not available.
2013-12-24 11:50:32 pandora_mon.inswitch.us [V1]Â
- Netflow daemon disabled.
2013-12-24 11:58:40 pandora_mon.inswitch.us [V1] [E] ‘pandora_mon.inswitch.us’: DBD::mysql::st execute failed: MySQL server has gone away at /usr/lib/perl5/PandoraFMS/DB.pm line 573.
2013-12-24 11:58:40 pandora_mon.inswitch.us [V1] Pandora FMS Server ‘pandora_mon.inswitch.us’ unhandled error.
2013-12-24 11:58:40 pandora_mon.inswitch.us [V1] [E] ‘pandora_mon.inswitch.us’: DBD::mysql::st execute failed: MySQL server has gone away at /usr/lib/perl5/PandoraFMS/DB.pm line 597.2013-12-24 11:58:40 pandora_mon.inswitch.us [V1] Pandora FMS Server ‘pandora_mon.inswitch.us’ unhandled error.
2013-12-24 11:58:40 pandora_mon.inswitch.us [V1] [E] ‘pandora_mon.inswitch.us’: DBD::mysql::st execute failed: MySQL server has gone away at /usr/lib/perl5/PandoraFMS/DB.pm line 621.2013-12-24 11:58:40 pandora_mon.inswitch.us [V1] Pandora FMS Server ‘pandora_mon.inswitch.us’ unhandled error.
2013-12-24 11:58:43 pandora_mon.inswitch.us [V1] [E] ‘pandora_mon.inswitch.us’: DBD::mysql::st execute failed: MySQL server has gone away at /usr/lib/perl5/PandoraFMS/DB.pm line 621.2013-12-24 11:58:43 pandora_mon.inswitch.us [V1] Pandora FMS Server ‘pandora_mon.inswitch.us’ unhandled error.
2013-12-24 11:58:43 pandora_mon.inswitch.us [V1] [E] ‘pandora_mon.inswitch.us’: DBD::mysql::db do failed: MySQL server has gone away at /usr/lib/perl5/PandoraFMS/DB.pm line 811.2013-12-24 11:58:43 pandora_mon.inswitch.us [V1] Pandora FMS Server ‘pandora_mon.inswitch.us’ unhandled error.
2013-12-24 11:58:43 pandora_mon.inswitch.us [V1] [E] ‘pandora_mon.inswitch.us’: DBD::mysql::st execute failed: MySQL server has gone away at /usr/lib/perl5/PandoraFMS/DB.pm line 621.2013-12-24 11:58:43 pandora_mon.inswitch.us [V1] Pandora FMS Server ‘pandora_mon.inswitch.us’ unhandled error.
2013-12-24 11:58:43 pandora_mon.inswitch.us [V1] Pandora FMS Server ‘pandora_mon.inswitch.us’ Shutdown by signal
2013-12-24 11:58:43 pandora_mon.inswitch.us [V1] [E] ‘pandora_mon.inswitch.us’: DBD::mysql::db do failed: MySQL server has gone away at /usr/lib/perl5/PandoraFMS/DB.pm line 811.2013-12-24 11:58:43 pandora_mon.inswitch.us [V1] Pandora FMS Server ‘pandora_mon.inswitch.us’ unhandled error.
2013-12-24 12:00:33 pandora_mon.inswitch.us [V1] Launching 5.0SP1 131120
2013-12-24 12:00:33 pandora_mon.inswitch.us [V1] Config options: Logfile at /var/log/pandora/pandora_server.log, Basepath is /etc/pandora/pandora_server.conf, Checksum is 0, Master is 1, SNMP Console is 0, Server Threshold at 5 sec, verbosity at 1, Alert Threshold at 60, ServerName is ‘pandora_mon.inswitch.us’
2013-12-24 12:00:33 pandora_mon.inswitch.us [V1]Â- Pandora FMS Enterprise module not available.
2013-12-24 12:00:34 pandora_mon.inswitch.us [V1]Â
- Netflow daemon disabled.
-
::
I’ve done a full backup / restore between two Centos (different versions) and it works nice. These are the steps I’ve done, compare with your steps:
1. Do the backup in the running system:
/usr/share/pandora_server/util/pandora_backup.sh -c /var/www/html/pandora_console/ -d /tmp
2. Copy the tarball to the other machine.
3. Execute the backup restore command:
/usr/share/pandora_server/util/pandora_backup.sh -f -c /var/www/html/pandora_console -s /tmp/pandorafms_backup_2013-12-26-19-56-13.tar.gz
4. Change the server name on the destination host to be the same as original host
vi /etc/pandora/pandora_server.conf -> servername token changed.
5. Restart pandora_server:
/etc/init.d/pandora_server start
6. Access console.
You should check also
a) pandora user has the same DB password on both servers, if not, modify config.php and pandora_server.conf
b) no errors coming from SQL, like: “ERROR 1153 (08S01) at line 4692: Got a packet bigger than ‘max_allowed_packet’ bytes” (that means some tables was not loaded)
c) BE SURE your path has not changed, if in original file was “pandora_mysite” and later is installed in “pandora_site2” you need to change config.php -
-
-
::
Ok after having another guy who installed the original server look at the problem, he found the culprit.
Look like he enabled https on the old apache server. So when i load the backup configuration having no ssl certs i cannot use HTTP nor HTTPS on the new server. Genearting new certs fix the problem.Thanks all for your help 🙂