My Crazy Move and Upgrade

I just finshed an upgrade that most of your will not have to do but some of you might be able to use the info to solve some other problem somewhere else, so I thought I would document it here.

My problem was that I had a machine in production that needed to be upgraded desperately, and because I’m basically lazy I had avoided doing the weekend backup-nukeit-startover routine. The machine that needed to be upgraded was running a version of Asterisk@home with freepbx 2.1 beta. Now I can see the collective cringes you are all having about running old beta software in production, but the problem with production is that once it’s up and running it’s hard to take it down again especially when everything is just working. But I know I’m on borrowed time so the plan was to take a nice shiny new 1U server, install the latest version of Trixbox/FreePbx, and move the config to it. Here’s how I did it

Shiny new box is set up and running the latest greatest Trixbox/FreePbx.

Go to the old box and do a backup of Free/Pbx, and ftp it to the new box.

On the new box create a new backup caled rihgtnow. Preform a dummy backup so it creates the proper directory and DB entry.

Copy the old freepbx backup to /var/lib/asterisk/backups/rihgtnow/

Restore the old backup on the new machine from the FreePbx Gui. Congradulations you have just bunked your new freepbx box, but never fear there is a way out.

On the command line go to /usr/src/freepbx, and run ./install_amp --force-version=2.0.0 . You will notice everyhting is still kinda bunked so do the next step.

On the command line again run ./install_amp --force-version=2.1.0 . Things should be better, but not completely right .

In the new GUI install and upgrade all of the modules you are using.

Congradulations if everything wento OK you have just moved your ancient FreePbx config over to the latest greatest version. Since it was done on a new box off line we could afford to blow things up a couple of times before getting the right combo down. I would not suggest this kind of tom foolery on a production box.

Now all we have to do is wait until after hours, move the current voicemail, and re-register the phones with the new server.

I hope you never have to upgrade from that point but if you do hopefully you can use this info to help you along. It is a testament to the developers of FreePbx that this is even possible.

Thank you to the FreePbx team for all of their ongoing efforts

I did a similar but more stupid upgrade a few days ago also. I had an old-ish system (an RC for Trixbox 2.1) that was behaving badly. Odd but intermittent problems and users who were losing faith in it. I’d recently done a Trixbox 2.2.12 (with FreePBX 2.3) that had gone very well, so I decided to just replace it with one big geek leap.

Rather than rely on backup-restore, which in these situations I always worry that I’m losing the shiny new defaults if I use, I went to each config screen and saved it from the browser - 46 screens in all.

I did the install with crossed fingers then went into the shiny new FreePBX and recreated all 20+ extensions, the 2 Sangoma Zaptel lines, the 2 SIP services and DID and the IVR, ring groups and time conditions that seem to be part of all installs.

It was a lot of tedious copy-pasting, but after 2 hours it was all basically working and an hour later I was ready to call it quits.

The office staff came back in the next morning, and, touch wood, have found all their problems resolved. (I’m counting on the placebo affect to buy me a couple of weeks at least!)

I had the luxury of a full evening offline coupled with the risk of a complete reformat on the same hardware and the bolstering of a recent install on almost identical hardware. I don’t recommend you repeat my efforts, but I figure its a tail worth telling in case you have no option.