Backup - Restore to new server

Bedrock
Posts: 107
Member Since:
2007-04-10

I am replacing a server and was wanting to backup the old server and restore to the new server.

I did a full backup on the old server, using the Backup & Restore, then copied the .tar.gz file to the new server in the /var/lib/asterisk/backup directory. Then I went into the GUI on the new server and did a restore of that file. It warned it would over right everything, I selected OK. I applied changed. It appears to have done nothing. There are no changes to the new server.

I need to migrate from one server to the next. Please advise.

Old Server = P4 2Ghz, 1GB Ram
Asterisk 1.2.13 svn rev 47264
Kernel Version 2.6.9-34.0.2.EL
CentOS release 4.4 (Final)
FreePBX Administration 2.2.0rc3

New Server = Dell PE SC440, PentiumD 3Ghz, 2GB Ram, Raid1
Asterisk 1.2.13 svn rev 47264
Kernel Version 2.6.9-34.0.2.ELsmp (SMP)
CentOS release 4.4 (Final)
FreePBX Administration 2.2.0rc3



ptemplin7
Posts: 76
Member Since:
2007-03-23
see other info

Hi,

There is another thread or two that help with this. I have a tyhread urnning that is similar. See the reply so far. Search for ptemplin7 or look for production to development transfer.
There is another on backups that has a link to this site: cat24.net/Mondoarchive.html
This sounds like it would take care of you.

Best wishes,
Paris

--

Paris Templin
Quality Computer Consulting for the North Puget Sound, Washington
www.templincomputing.net



liux
Posts: 58
Member Since:
2006-12-06
Restoring to a new server

I've done this by first of all backing up the newly installed TB to some temporary directory after defining one arbitrary extension. To this backup directory which resides in /var/lib/asterisk/backup I've copied the old .tar.gz backup file. Then I was able to do a full restore.

Hope this will help.



percykwong
Posts: 758
Member Since:
2007-04-30
dd is your friend. do a dd

dd is your friend. do a dd to your new drive.

It'll autodetect the new hardware when it boots up.

--

-----------------------------------------------
Percy Kwong
Trixbox Tech Support - 202.600.3884

Swimminginthought.com



nnishp
Posts: 2
Member Since:
2007-06-19
not to sound stupid but what

not to sound stupid but what exactly is dd? sorry im new here just learning as much as i can!



anchor85
Posts: 678
Member Since:
2006-06-07
what is dd

Ans:
dd - convert and copy a file. In the context of this thread its a way of reading from and writing blocks of data to disks.

run the command ' man dd ' at the console and you will get the manual page or you can google for ' linux dd ' here are some of the answers

http://www.codecoffee.com/tipsforlinux/articles/036.html or http://www.linuxjournal.com/article/1320

this is the wikipedia version

hth
John

--

John
Cat24.net



ptemplin7
Posts: 76
Member Since:
2007-03-23
The only problem with dd is....

If you have large drives like I do it takes literally forever to copy the drive. This is the third day I have you running for a 60 gb to 80 gb copy.

I do have a problem with the ticks and had to switch to sane timesource but its still chugging. Look up the thread I started about production box to development box. There were some good replies to that one.

One trick I am learning is to make sure the versions are the same if you transfer the backups over!
Hope this helps,
Paris

--

Paris Templin
Quality Computer Consulting for the North Puget Sound, Washington
www.templincomputing.net



psdata
Posts: 160
Member Since:
2006-06-01
re± Backup - Restore to new server

Hello,

My builds of TB are simpel and straiht, out off the box only the a few config files I had to change and the programming off all extentions ect.

So at the first I build a system from de CD and make it working in the basic´s (that would be one trunk, a few extentions ect) ) I place all update´s and everything what is neasery, and thinks what you have change on the old from standard.

Then I put the new box on for a couple off day´s so your hardware is `burn´t in`

Then I connect with a MySQL client to the old TB box and to the new one and I coppied two database´s from the old one to the new one `asterisk and asteriskcdrdb` the other db I don´t use.

I go to the freepbx interface and puch the red bar. In the mean time I disconnect the old box from the network. Then I go if ready on the new box to the network interface and give the new one the ip adress off the old one.
Then one are to .conf to set well sip nat.conf ect
And you have a workingreplacement off the old one.

This only works if you not change very mutch on a standard install

I also made on this way `complex` setup´s for other configuration. If i get a job I collect the two database´s )for programming you only need one (asteriks) upload it to my test machienne, programming everything again are expanding extentions, pick up, groups ext make a dump a go to the client and uplaod it their again. Puch the red buton and all new programming had be done.

Regards

John



percykwong
Posts: 758
Member Since:
2007-04-30
DD.. use the following

DD.. use the following command..

dd if=/dev/hda of=/dev/hdb bs=32768

It works a helluva lot faster.. the default block size is 512.. this makes the whole thing hum, sing, etc..

80GB Drive in 1.5 hours.

--

-----------------------------------------------
Percy Kwong
Trixbox Tech Support - 202.600.3884

Swimminginthought.com



Bedrock
Posts: 107
Member Since:
2007-04-10
Should not the Backup and

Should not the Backup and Restore option work? If I run a backup on the old server, using the untility in FreePBX, (Asterisk:FreePBX:tools:Backup & Restore) then copy the .tar.gz file created with that backup job to the new server in the correct directory ( /var/lib/asterisk/backups) and then restore it from the Backup and Restore utility - it shows the file I moved from the old server - should that not work?

Do I need to go into the new server and create an IVR, Trunks, Routes, Extensions, etc... for some reason before I do the restore? I've read people say they created an extension before they did the restore.

Something is fundamentally wrong when I follow this process, because it does nothing, and the options when I do the restore are limited.



percykwong
Posts: 758
Member Since:
2007-04-30
The backup option works and

The backup option works and you don't need to recreate everything. It just requires a trixbox install and you to move over things like everything in your tftp folder and other specific changes you made to your server.

the dd method gives you an exact sector for sector backup of the entire drive. If the hardware changes, during bootup, it will detect it and configure automatically as long as you're not using any non-standard stuff..

My personal preference is dd.. it's quick, easy and it always seemed to work for me. but that's just me.

I have a specialized trixbox config so the standard backup / restore app isn't practical for me. plus i have my tftpboot loaded with all the niceties like all the cisco firmware revisions, etc.

I've also got some custom configuration stuff I use.. (like sendmail set up to do mailauth to an external mailserver on port 26) and custom context stuff. So I do the DD method and my deployments are always set up the way I like them. I just modify the partition size to match my target harddrive afterwards and it's ready to go.

It's quick and painless for me to use dd. Everyone has a favorite method. Mine is dd.
I've got a hylafax dd also for when I want to setup remote fax server services. It just defaults the fax server as extension 1100 and I just point a DID at it and it goes..

Total deployment time for me on a 20 extension system + faxserver + all phones and queues is about 2-3 hours.. so you can see why i do things the way i do them.

--

-----------------------------------------------
Percy Kwong
Trixbox Tech Support - 202.600.3884

Swimminginthought.com



Bedrock
Posts: 107
Member Since:
2007-04-10
I got it to work!

The control environment broke down, but this is exactly what did this afternoon right before it worked.

1. I prayed to God, something I should have done first.
2. I went into FreePBX and created a simple IVR, Trunk, Outbound Route, saved a Recording - I had created a simple extension earlier (this process took about 1 minute - i just went into these area and made a change, saved it, and clicked the red button)
3. I uploaded the latest backup file from the old server. I've been FTPing the file to a FTP site, then pulling the .tar.gz file down to the new server using WGET. Talking to a friend yesterday - he said to make sure I was uploading in Binary mode and not ASCII mode. I uploaded in standard mode (ASCII - which I'd been doing mainly), then I uploaded in Binary and there was a file size difference - not much, but enough to make me think.
4. I rebooted the server last night.

I then went to restore a backup, and - all the restore options then showed up. I restored, and everything is now showing up.

Thanks for the help. I'm gonna work with dd some, in the development environment, for not the Backup & Restore option is all I needed.



255
Posts: 133
Member Since:
2006-12-07
Back up & Restore ISSUES!

I did a full backup of a TB 2.2 system last week. FTP'ed the backup off the server, then reinstalled.

I found that while the restore appeared to work some vital data was not restored.

The New TB appeared to work fine and the first sign of issue was that an internal call was coming up from "unknown". On further investigation it seems that the Caller ID's had been not restored. Even though the name of the extension was intact.

The other thing that has been noticed is that in the ARI interface you can no longer play the old calls that have been recorded.

Still looking for other issues......

--

Alan Scott
Logical Solutions
New Zealand

http://www.logicalsolutions.co.nz
alan.scott@255.co.nz



Bedrock
Posts: 107
Member Since:
2007-04-10
Another note on the backup

Another note on the backup process, from what I have painfully expereinced

When I was restoring onto a new box, more than once. It would not restore the second time unless I removed the extensions. (E.g. I restored to a new box, but did not implement it immediately, so I decided to restore the next day's latest backup. The 2nd restore would not work, it would do nothing, unless I removed the extensions, then it would restore the latest backup)

Also remember if your doing FTP to watch out for ASCII vs Binary file xfers. Windows FTP server default to ASCII when you need to xfer in Binary mode (just type "binary" at the command line )



bocar
Posts: 50
Member Since:
2006-06-01
mondo

Has anyone done a successful 'bare metal' restore using the mondo archive .iso backup files that are discussed in various threads here and mentioned above?



anchor85
Posts: 678
Member Since:
2006-06-07
Mondo backup / restore

Yes, I have done this several times. You just type 'nuke' when you boot from the first mondo backup disk. A while ago I wrote a mondo how-to its on my website here: http://cat24.net/Mondoarchive.html

John

--

John
Cat24.net



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.