Server Cloning

Discussion in 'General' started by vperez69, Oct 19, 2010.

  1. vperez69

    Joined:
    Sep 2, 2010
    Messages:
    71
    Likes Received:
    0
    So ... I've messed up my PBX. Somehow, FOP gives me an error message to the effect that SSL has received a record longer than is permissible. So I couldn't monitor agents, not from FOP nor from the dhtml OP Panel (no extensions would show). Plus, I couldn't get Asternic Call Center Stats to work, nor Monast. I don't feel bad about it: its a learning process and I've only been fiddling with Linux and PBX's for a month.

    Since I had an old Gateway 8300 ALR lying around, I decided that rather than fiddle with it, I'd just make a new one. On this one, I applied everything I've learned and everything is working 100% as it should. But ...

    I don't want to just 'lose' my old data. It was maybe two weeks worth of recordings and valueable queue data. Is there an easy way to just pass files from one to the other (without overriding any config files) such that I can have my recordings, logs and cdr data on the new one?
     
  2. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    you probably needed to access the site with
    Code:
    https://<you> and not http://<you>
    the rewrite conditions were explicit, did you mess with them extrinsically or intrinsically , you know all that asternic, monast stuff you did?

    the recordings will be in /var/spool/asterisk/monitor on the old box . the cdr's are available by mysql from the old box or if you really screwed yourself in /var/log/asterisk/cdr-csv/Master.csv
     
  3. vperez69

    Joined:
    Sep 2, 2010
    Messages:
    71
    Likes Received:
    0
    Neat! Thank you! I'll see about moving the recordings tomorrow. For the cdr, does the Master.csv file you mention already have all of the same info as MySql? Or is it better to export the records from the old box into a CSV and then re-import into the new box?

    In case you are curious, I actually don't know how I messed up FOP. I know I changed *.conf files left and right. I also know I had trouble getting Twisted to work because I didn't have gcc, and by the time I figured out how to install it from Yum, I'd already tried changing stuff all over. Likewise, I have no idea why I could never get Call Center Stats to work. It wouldn't display anything, and I am sure I followed all the INSTALL instructions. Obviously I messed up somewhere. What I do know for SURE, is that I did not mess any SSL configs. I wouldn't even know how to locate them (without googling for at least 10 minutes anyway). I downgraded FOP, brought back to .3, fiddled with the FOP, went to my old trixbox and copied the panel directory out. Nothing worked. Finally I gave and started from scratch, being extra careful this time, to read all README's and INSTALL's, and FINALLY I am 100% happy with my end product. :)
     
  4. vperez69

    Joined:
    Sep 2, 2010
    Messages:
    71
    Likes Received:
    0
    Dicko,

    Hello! Just to let you know my experience with the ALR 8300. Its an old machine with 2 Pentium III/500 XEON processors and 1 GB of RAM - remarkable 10 years ago when I bought it. So the PBX functionality is OK, but its definitely much slower. FOP works well, but it blinks a lot. Also, users have gotten some empty calls, which never happened with the other one. So, I guess its back to the workshop tonight.

    Exporting the SQL file was a breeze. Copying the recordings ... well, I'm already almost 3 hours into it, and its gone through maybe half the list. So tonight's project is to reinstall Elastix on my original machine, configure everything the way I did it on the ALR, and then reimport the stuff it had from before. My only concern is: Will it be safe to import ALL of the SQL databases? I assume all the important configs are plain text files in /etc/asterisk, correct? Anyhow Hopefully when I'm done, I'll REALLY be pleased with it.

    Thanks for all your input, it has been extremely useful to me.
     
  5. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    Actually no, all you configs are stored in mysql tables, FreePBX will largely recreate those files from these tables. Any customizations you have done will generally be in /etc/asterisk/*custom* files

    If you have a system to 'export', dump all the mysql tables into a file and then reimport them into the 'new' server, this will work for most of your state (including passwords, caveat), it will not work for the Elastix stuff, that uses sqlite3 but a rsync of /var/www/html/* will probably get you back to the same Elastix state, but only if the version is identical ;) postfix etc. are a different question.

    cdr's are in both the mysql asteriskcdrdb table and reflected in the Master.csv.
     
  6. vperez69

    Joined:
    Sep 2, 2010
    Messages:
    71
    Likes Received:
    0
    Ah! Thanks for the tip. I just finished installing Elastix from CD and am currently running all updates.

    The most important thing I want to keep from the 'old' config are the CDR's, but from your input, I gather it's best to reimport it from CSV, rather than from the MySQL dump. I guess its a matter of mapping the CSV Columns to a table?
     
  7. dicko

    Joined:
    Oct 24, 2008
    Messages:
    4,099
    Likes Received:
    0
    Actually , when mysqld is not running, rsync'ing or scp'ing , I forgot that Elastix doesn't find rsync useful

    /var/lib/mysql/*

    to the new server will be largely effective.

    (yum install rsync to get rsync)
     
  8. vperez69

    Joined:
    Sep 2, 2010
    Messages:
    71
    Likes Received:
    0
    awesome ... thanks!
     
  9. vperez69

    Joined:
    Sep 2, 2010
    Messages:
    71
    Likes Received:
    0
    Today was a perfect day. Everything worked as it should. I was so happy, I locked myself in my office and wept for five minutes.

    My next project is working on sound quality. When I call my phone ... there is a very lightly audible hum on the background. Not sure if its static, interference, or feedback. Does Asterisk have any Quality of Service or Quality of Sound congifs/settings? Or does that fall squarely on the endpoints? Anyone fiddle with this kind of stuff in the past?

    My phones, by the way, are Zed-3 phones. The PBX I replaced with Elastix was a Zed-3 as well, but I seriously did not have a good experience with it. The only cool phone, is of course, mine, an old Cisco 7940 which I've had for years, but only recently learned how to convert to SIP and put it to work on my desk. It is also, the only phone that has no hum - so I have a sinking feeling that the hum is endpoint related, but I thought I'd ask anyway.
     
  10. Lee Sharp

    Joined:
    Sep 28, 2010
    Messages:
    332
    Likes Received:
    0
    Start a new thread with a better subject for this. You will get more views...

    And try a soft phone to see if it has the hum.
     

Share This Page