jmullinix
Guru
- Joined
- Oct 21, 2007
- Messages
- 1,263
- Reaction score
- 7
Hey all,
A client of mine discovered a way to recover the configs on a phone system that has not been backed up and won't boot. All of the credit for this goes to Paul at Keystone Digital in Pennsylvania.
First, build a new PIAF box. Then take the old drive, put it in a USB drive carrier and plug it into a USB port. You can use dmesg to find out its location; something like /dev/sdc3. Mount the drive to a temporary folder. I mounted mine to tempdrv
mount /dev/sdc3 /tempdrv
Now, on the new machine, stop the mysql service
service mysqld stop
Navigate to /var/lib/ and rename the mysql folder to something else.
mv mysql mysql.old
I did this just in case something goes terribly wrong. Now copy the mysql folder off of the old drive to /var/lib/
cp -r /tempdrv/var/lib/mysql /var/lib/
Now change the owner of the newly created mysql folder to mysql:mysql
chown -R mysql:mysql /var/lib/mysql
Now restart mysql
service mysqld start
Now copy the usual stuff from /var/lib/asterisk/keys, /var/lib/asterisk/sounds/custom and perhaps the voicemails from /var/spool/asterisk/voicemail/
You should now be able to access FreePBX and it should be fully populated with the old machines stuff. Click on something, then scroll to the bottom and click submit. When you click on the orange bar, it will build the required files in /etc/asterisk.
Finally, if you have a TDM card, rebuild the drivers for it and bounce the box. You should have a functional PBX.
Paul and I won't promise that this will work every time. He had a RAID 1 failure and the old machine would not boot from either drive but we were able to access the one drive to make this work. Your mileage may vary.
A client of mine discovered a way to recover the configs on a phone system that has not been backed up and won't boot. All of the credit for this goes to Paul at Keystone Digital in Pennsylvania.
First, build a new PIAF box. Then take the old drive, put it in a USB drive carrier and plug it into a USB port. You can use dmesg to find out its location; something like /dev/sdc3. Mount the drive to a temporary folder. I mounted mine to tempdrv
mount /dev/sdc3 /tempdrv
Now, on the new machine, stop the mysql service
service mysqld stop
Navigate to /var/lib/ and rename the mysql folder to something else.
mv mysql mysql.old
I did this just in case something goes terribly wrong. Now copy the mysql folder off of the old drive to /var/lib/
cp -r /tempdrv/var/lib/mysql /var/lib/
Now change the owner of the newly created mysql folder to mysql:mysql
chown -R mysql:mysql /var/lib/mysql
Now restart mysql
service mysqld start
Now copy the usual stuff from /var/lib/asterisk/keys, /var/lib/asterisk/sounds/custom and perhaps the voicemails from /var/spool/asterisk/voicemail/
You should now be able to access FreePBX and it should be fully populated with the old machines stuff. Click on something, then scroll to the bottom and click submit. When you click on the orange bar, it will build the required files in /etc/asterisk.
Finally, if you have a TDM card, rebuild the drivers for it and bounce the box. You should have a functional PBX.
Paul and I won't promise that this will work every time. He had a RAID 1 failure and the old machine would not boot from either drive but we were able to access the one drive to make this work. Your mileage may vary.