Big troubles, the whole system is broken, help!

[system is not compromised (i.e. security issue) it is broken - mod]

Hi everyone, i hope someone can spend his time to try help me.
its been more than 6 months since the system started running fine, never had problem and everything was fine, in/out coming calls, queues and so on…
Yesterday morning i wake up and it was not possible anymore to take incoming calls from the outside (internal and outgoing was fine)
I disabled the firewall, restarted it, nothing changed, so i tried to do a Restore.
and from there the system got compromised!
I dont know how the hell the restore failed, it says its corrupted with some errors, but months ago i tested the backup and it used to works fine!
Now, i tried to do a whole new installation, running an older backup, the system felt like was fine but it actually missed a file or someting! i did a /reboot form my machine and this happens

any idea on what to do? any idea on why the latest backup got corrupted randomly?
im so in troubles since now my company is without comunications, hope someone can help, thanks for your time!

First of all, did you restore on the same version?

Can you SSH in to the PBX?

1 Like

thats the problem… how can i be sure that the backup and the new system have the same version?
i think they are both 14
yes, i can SSH into the pbx if needed

Can you check if you are out of space?

df -h

Also, try to restart Asterisk

fwconsole restart
1 Like

need to install putty then i will put the results here!

df -h did this

the other:

[root@freepbx ~]# fwconsole restart
Running FreePBX shutdown…

Core FastAGI Server is not running
RestApps Server is not running
Stopping UCP Node Server
[>---------------------------] < 1 sec
Stopped UCP Node Server
Stopping Chat Server
Stopped Chat Server
Zulu Server is not running
Shutting down Asterisk Gracefully. Will forcefully kill after 30 seconds.
Press C to Cancel
Press N to shut down NOW
[============================] 1 sec
Wanrouter: No valid Sangoma Hardware found, if you have no Sangoma cards this is OK
Stopping DAHDi for Digium Cards
DAHDi Stopped
Queue Callback Server is not running
Running FreePBX startup…
Running Asterisk pre from Dahdiconfig module
Wanrouter: No valid Sangoma Hardware found, if you have no Sangoma cards this is OK
Starting DAHDi for Digium Cards
DAHDi Started
Running Asterisk pre from Firewall module
Running Asterisk pre from Sysadmin module
Running Sysadmin Hooks
Restarting fail2ban
fail2ban Restarted
Updating License Information for 70205959
Checking Vpn server
Starting Asterisk…
[============================] 1 sec
Asterisk Started
Running Asterisk post from Core module
Running Asterisk post from Dahdiconfig module
Running Asterisk post from Endpoint module
Running Asterisk post from Pagingpro module
Running Asterisk post from Restapps module
Starting RestApps Server…

Broadcast message from [email protected] (Wed Jun 26 11:07:19 2019):

Firewall service now starting.

[>---------------------------] < 1 sec
Started RestApps Server. PID is 23106
Running Asterisk post from Ucp module
Starting UCP Node Server…
[>---------------------------] < 1 sec
Started UCP Node Server. PID is 23764
Running Asterisk post from Vqplus module
Queues Pro is not licensed.
Running Asterisk post from Xmpp module
Starting Chat Server…
[>---------------------------] 1 sec
Started Chat Server. PID is 23880
Running Asterisk post from Zulu module
This product is not licensed
[root@freepbx ~]#

the new installation is fresh, the activation of the machine is the same as it was before!

So all good now?

nonono, i need to do a restore, but it doesnt works!
if i go with restore, it get compromised and doesnt work
but it should, it definitly should because im sure that, months ago, i tested the backupfiles and they used to work!

Can you post the steps how you tried restoring?

i just setup the FTP server from the backup &restore module
select the back up zip file, select all the files except CDRs, click “Go!”

btw, on the new installation i did a backup just to see if the path war right… well, it did the backup, so then i used the older one from 6 months ago, the system got compromised as tyou can see belove, AND THE BACKUP OF THE LAST NEW INSTALLATION DISAPPEARED o.O
now the system is basically f.up and cant do anything except do another fresh intallation…
im worried i will have to start from zero and do all the settings and operations i did months ago…

as you can see… my older backup are version 14.0.5.2
latest fresh install are 14.0.10.3

i cant believe that i cant do a backup even if both are version 14… im so confused

Maybe try to downgrade the backup module and see if it works.

This has been a problem for at least as long as I’ve been using Asterisk@Home and AMP. One of the selling points, and a huge amount of the expense in creating Asterisk 15, was to solve this known specific problem. You can’t restore from a different version to a FreePBX installation before Asterisk 15. I’ve heard the legends of people using the backup and restore module, but when I’ve tried, it’s consistently failed. I’ve never been able to get all of the specific modules to work - there’s always one that screws up the reinstall. Moving it from one machine to another has also always been consistently disastrous. The new one in Asterisk 15 works (from what we’re hearing) for the first time that I know of.

If that’s true, you could try installing Asterisk 15 on your server, restore the Version 14 backup, and let us know if that worked.

this is a heking big problem… gonna do a whole new installation and making a guide for myself so the next time i’m in trouble i can just reinstall everything and its gonna be fine…

BTW i discovered all the problems started by the external telephones lines, it had nothing to do with my PBX … so basically i fuked up everything tryng to restore and it was worthless XD

is there a way to get informations from the backup?
like some setupts and so on…

I’ve never looked at the backup files, but if you’re a reasonably adept Unix Guru, you can probably unpack them and look at them. I’d guess that they are mysqldump files, which are nothing more than a series of MySQL scripts that put data back into databases. You probably can’t use the database data directly, but at least you can get the information.

A ‘full’ backup has two mysql dumps, one for asterisk mysql-3.sql one for asteriskcdrdb, mysql-4.sqlb, you can ‘read’ them into mysql to regenerate the mysql state.
There is also a copy of the sqlite3 database that gets put into /var/lib/asterisk/astdb.sqlite3

There are also copies of asterisk related files in /var/www/html/ , /var/lib/asterisk and /var/spool/asterisk and /etc/asterisk.

Unless you have trashed your filesystem , then restoring the three databases is all you need to restore your system

1 Like

My system was hopelessly failing as well. Note sure if you introduced additional issues by trying to restore but my suggestion is to upgrade to the latest version of everything with CLI command
fwconsole ma updateall
yum update

This will update the system, to an unstable version but will allow you to downgrade to a stable version by running the following command

fwconsole reload
yum downgrade asterisk*

This should put you into the stable version 13.22

I’m sure there is an easier way to do this but I had 5 systems that became completely unstable after upgrades and this made them all stable!

No. The non working version of Asterisk 13.26 was pulled from the repos when identified months ago.