How to export extensions, routes, etc from CLI


(Bob Reiber) #1

I realize that this might be more of a MySQL question but I’ve got a couple servers that are having major issues with the GUI crashing and the backups aren’t any good. Asterisk continues to run but there’s a lot of things I cant do without GUI access. Still not sure what is causing this but I want to rebuild them on new virtual machine ASAP and will have to do it manually.

How can I run the bulk handler from the CLI and get it to spit out a csv?


(Lorne Gaetz) #2

Bulk handler fwconsole docs are here, but only import is supported. Easiest is if the flaky machines can run the conversion script:
https://wiki.freepbx.org/display/PPS/Elastix+and+PBXinaFlash+to+FreePBX+Distro+Conversion+Tool


(Bob Reiber) #3

Thanks a lot for that. For the conversion script, do both machines need to be on the same firmware level?


(Lorne Gaetz) #4

No, that’s the whole point. It’s for transferring settings between non-matching PBX versions. And this is documented in the linked wiki page.


(Bob Reiber) #5

Maybe another dumb question: I’m trying to transfer my paid modules without having to use a zend reset, whats the best way to do this? Its demanding that I activate the machine before running the “curl -s https://convert.freepbx.org | bash” command.

Or how can I deactivate the running PBX without using a zend reset?


(Bob Reiber) #6

I guess it doesn’t matter anyway. The old PBX is dead. Asterisk seems to be running but everything else is unusable. I reset the hardware lock and activated the new one, on the old broken one entered: “curl --insecure https://convert.freepbx.org | bash”, and got the following messages (after entering the ID that the new machine gave me)

Testing FreePBX functionality … Failed. Received 'PDOException: SQLSTATE[HY000]: General error: 145 Table ‘./asterisk/notifications’ is marked as crashed and should be repaired in file /var/www/html/admin/libraries/BMO/Database.class.php on line 252
Stack trace:

  1. PDOException->() /var/www/html/admin/libraries/BMO/Database.class.php:252
  2. PDO->query() /var/www/html/admin/libraries/BMO/Database.class.php:252
  3. FreePBX\Database->sql_query() /var/www/html/admin/libraries/BMO/Database.class.php:221
  4. FreePBX\Database->sql() /var/www/html/admin/libraries/DB.class.php:235
  5. DB->sql() /var/www/html/admin/libraries/sql.functions.php:29
  6. sql() /var/www/html/admin/libraries/BMO/Notifications.class.php:277
  7. FreePBX\Notifications->delete() /var/www/html/admin/libraries/BMO/View.class.php:145
  8. FreePBX\View->setLanguage() /var/www/html/admin/libraries/view.functions.php:25
  9. set_language() /var/www/html/admin/bootstrap.php:220
  10. require_once() /etc/freepbx.conf:9
  11. include() /tmp/tmp.H5hqEYK11X/freepbx.inc.php:8’ instead of ‘OK’
    Cleaning up…Done!

(Dave Burgess) #7

Bob, I don’t think you can get there. On the other hand, zend resets aren’t that hard to get and spend. In this case, especially with your machine in chaos, I’d bite the v-bullet and go to town.


(Bob Reiber) #8

Can I deregister the broken PBX and register the new one using that Zend ID and make this work or do both PBXs need to be registered at the same time?


(Dave Burgess) #9

There’s a Wiki on this, but it seems to me you put the new one up, populate it to the best of your ability, and transfer everything from the old deployment ID to the new deployment ID. At least, when I replaced the Methuselah server last year, that’s how I did it.


(Bob Reiber) #10

It doesn’t say anything in the wiki about paid modules. So I guess I’ll just get a new zend ID and see about moving the licenses manually from one zend ID to another.


(system) closed #11

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