Restore FreePBX Phone System 60 From Command Line

Gents,

I’m attempting to test a Freepbx Phone System 60 and have locked myself out of the GUI due to changing the http port assignment.

The original intent was to try to get “Let’s Encrypt” to work, but now I’ve created a larger issue. Right now, I’ve found a backup but when I try to run it, I’m told that “–restore” doesn’t exist:

fwconsole backup --restore /home/asterisk/6_Jun_19_backup.tar.gz

The “–restore” option does not exist.

Admittedly, I’m out of my depth to a degree using command line being my skillset is with the Cisco call manager environment, and I’m expanding my platform knowledge.

Any ideas on how to accomplish this is helpful.

Jay

What version of backup do you have?
fwconsole ma listonline | grep backup

[jbusch@pbx ~]$ sudo fwconsole ma listonline | grep "backup\|Module\|---"
+----------------------+------------+----------------------------------------------+-------------+
| Module               | Version    | Status                                       | License     |
+----------------------+------------+----------------------------------------------+-------------+
| backup               | 15.0.10.43 | Enabled and up to date                       | GPLv3+      |
+----------------------+------------+----------------------------------------------+-------------+

You can see what your ports are this way.

[jbusch@pbx ~]$ sudo fwconsole sysadmin ports
+----------+-------------+
| Port     | Name        |
+----------+-------------+
| disabled | restapps    |
| disabled | restapi     |
| disabled | ucp         |
| 80       | acp         |
| 84       | hpro        |
| disabled | leport      |
| disabled | sslrestapps |
| disabled | sslrestapi  |
| disabled | sslucp      |
| 443      | sslacp      |
| 1443     | sslhpro     |
+----------+-------------+

Worst case, edit the mysql database

fwconsole mysql

update `sysadmin_options` set `value` = '80' where `key` = 'acp';

quit

fwconsole reload

My version is shown below after running the command you provided (thanks):

backup | 14.0.10.11 | Enabled and up to date | GPLv3+ |

Also,

this is the port assignment running on my FreePBX Phone System 60 after a module and yum -y update:

±-----±------------+
| Port | Name |
±-----±------------+
| 82 | restapps |
| 83 | restapi |
| 81 | ucp |
| 8080 | acp |
| 84 | hpro |
| 80 | leport |
| | sslrestapps |
| | sslrestapi |
| | sslucp |
| | sslacp |
| | sslhpro |
±-----±------------+

I tried the mysql database update with the following perameters (no change):

update sysadmin_options set value = “8080” where key = acp;

Is there anything else I can do, short of running a “restore” of a file I have from a year ago and just restore the system to a previous state via command line?

Thanks for the assistance…

Jay

Additionally, here are a few more errors I’m experiencing:

● httpd.service loaded failed failed The Apache HTTP Server
● fail2ban.service loaded failed failed Fail2Ban Service


[root@gtscpbx /]# grep -r Listen /etc/httpd/*
Binary file /etc/httpd/conf/.httpd.conf.swp matches
/etc/httpd/conf/httpd.conf:# Listen: Allows you to bind Apache to specific IP addresses and/or
/etc/httpd/conf/httpd.conf:# Change this to Listen on specific IP addresses as shown below to
/etc/httpd/conf/httpd.conf:#Listen 172.16.3.4:80
/etc/httpd/conf/httpd.conf:#Listen 8080
/etc/httpd/conf/httpd.conf.rpmnew:# Listen: Allows you to bind Apache to specific IP addresses and/or
/etc/httpd/conf/httpd.conf.rpmnew:# Change this to Listen on specific IP addresses as shown below to
/etc/httpd/conf/httpd.conf.rpmnew:#Listen 12.34.56.78:80
/etc/httpd/conf/httpd.conf.rpmnew:#Listen 80
/etc/httpd/conf.d/schmoozecom.conf:Listen 8080
/etc/httpd/conf.d/schmoozecom.conf:Listen 81
/etc/httpd/conf.d/schmoozecom.conf:Listen 83
/etc/httpd/conf.d/schmoozecom.conf:Listen 82
/etc/httpd/conf.d/schmoozecom.conf:Listen 84
/etc/httpd/conf.d/schmoozecom.conf: Listen 80
Binary file /etc/httpd/conf.d/.schmoozecom.conf.swn matches
Binary file /etc/httpd/conf.d/.schmoozecom.conf.swp matches
Binary file /etc/httpd/modules/mod_heartmonitor.so matches
Binary file /etc/httpd/modules/mod_mpm_event.so matches
Binary file /etc/httpd/modules/mod_mpm_prefork.so matches
Binary file /etc/httpd/modules/mod_mpm_worker.so matches

If I could get the httpd service running, I believe that would fix the bulk of my issues:

[root@gtscpbx /]# systemctl status httpd.service
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Mon 2020-12-28 23:45:47 CST; 31min ago
Docs: man:httpd(8)
man:apachectl(8)
Main PID: 6594 (code=exited, status=1/FAILURE)

Dec 28 23:45:47 gtscpbx httpd[6594]: AH00112: Warning: DocumentRoot [/invalid/folder/name] does not exist
Dec 28 23:45:47 gtscpbx httpd[6594]: AH00558: httpd: Could not reliably determine the server’s fully qua…ssage
Dec 28 23:45:47 gtscpbx httpd[6594]: (13)Permission denied: AH00072: make_sock: could not bind to addres…:]:83
Dec 28 23:45:47 gtscpbx httpd[6594]: (13)Permission denied: AH00072: make_sock: could not bind to addres…0:83
Dec 28 23:45:47 gtscpbx httpd[6594]: no listening sockets available, shutting down
Dec 28 23:45:47 gtscpbx httpd[6594]: AH00015: Unable to open logs
Dec 28 23:45:47 gtscpbx systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Dec 28 23:45:47 gtscpbx systemd[1]: Failed to start The Apache HTTP Server.
Dec 28 23:45:47 gtscpbx systemd[1]: Unit httpd.service entered failed state.
Dec 28 23:45:47 gtscpbx systemd[1]: httpd.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

My apologies for flooding you with this…

Jay

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.