Web Hosting Talk







View Full Version : How to move sites to another server?


brandon
05-08-2002, 08:37 PM
Can anyone guide me how to move all my sites to another server
including emails and MySql in CPanel and Webhostmanager?

I don't have the root access. Any suggestion?


Thank you.
Brandon

SFX
05-09-2002, 12:17 AM
I've recently had a same question, and asked my IPS, but they told me there would be no automated way.
As far as I know, you should tar up all the files, and do mysqldump.
Do you have many accounts to move?

SFX
05-09-2002, 12:22 AM
It seems that Cpanel has just added a new backup feature.
----
cPanel Backup can now backup/restore mySQL databases, alias files, and filter files. (4.7.0 build 116 or later only)
----
This might help you.

brandon
05-09-2002, 01:38 AM
As far as I know, you should tar up all the files, and do mysqldump.
Do you have many accounts to move?


Not many, I am more concern on my client's mail user and the password file, I cannot asked them to manually enter everyone again.

Mysqldump: Yeah it definitely take care of mysql file.

Thank you,
Brandon

SFX
05-09-2002, 04:06 AM
Wmmm, that could be a problem.
Anyone knows if there is anyway?

reddendon
05-14-2002, 05:14 PM
are you using sendmail...they generally have dat files that can be transferred...i think I remember that :)

Wazeh
05-14-2002, 10:48 PM
Brandon, you don't need to have root access to copy over yoru clients' email passwords. If you have the clients' passwords (for their main accounts) you can tar their ~username/etc/passwd and ~username/etc/shadow and then create pop accounts on the new server (your provider can run it faster with a script if they are too many). Then simply untar the passwd and shadow files in the new directories. At this point, the new email accounts will have the old passwords from the previous server without you knowing what each password was.

Website Rob
05-15-2002, 12:19 AM
I used to know how to do this by Telnet, but can no longer remember -- text file was accidently destroyed. Although it does not work with most Database files (that are not in the account directories) it is one of the best methods I have found.

Takes about 1 - 5 minutes (regardless of site size) to move from old to new Server, as long as you have Telnet access plus Username/Password on each end. Would anyone know the Telnet commands? Would like to have them back myself, actually.

insiderhosting
05-15-2002, 12:25 AM
If they are cpanel accounts on another server tar -zvcf homedirectory.tar.gz * in /home/username. This will backup the sites only not the databases. Just do a mysqldump on the databases and it will back them up. Then in ssh type ftp newserversip (replacing newserversip with the ip of the account on the new server and type your username and password. Then click enter.
After you are taken to an ftp>
put homedirectory.tar.gz then press enter. Do the same for your sql files.

On the new server SSH and use this command tar -zxvf homedirectory.tar.gz (it will need to be in /home/username too). As for the mysql db's use mysql -uusername -ppassword database_name < somesqlfile.sql With a bit of luck this is all you should need.

Steven

MotleyFool
05-15-2002, 05:54 AM
AFAIK, there is no good way to move emails, especially if your source MTA and target MTA are different

For moving sites you can use wget

wget -m -nH http://sitename.com

[see man wget for all the options and choose form them]

You should run this from the target server at command line and it will mirror the site

For mySQL mysqldump is good enough

I have no idea at all about moving sites through control panels

Hope it helps
Balaji

Website Rob
05-17-2002, 01:30 AM
Thanks for the sharing, guys. Although I'm not sure of "wget" as I've never used it, the Telnet commands posted by Steven at insiderhosting.com, look sort'a familiar. Been awhile.

Now I just need to get some practice in and work out the kinks.

SFX
05-17-2002, 02:37 AM
I'm not sure, but maybe you can add "-p" option when you tar up the homedirectory.
This will keep all the file permissions.

nogi
07-23-2002, 02:40 PM
There is a function in WHM to transfer client accounts from one CPanel/WHM server to another CPanel/WHM server. You would need to give your current provider the root password and ip of your new server and ask them to transfer the accounts. I'm not sure however, if the mysql databases is copIed over as well.

John

Dedicated
07-23-2002, 03:31 PM
Originally posted by nogi
There is a function in WHM to transfer client accounts from one CPanel/WHM server to another CPanel/WHM server. You would need to give your current provider the root password and ip of your new server and ask them to transfer the accounts. I'm not sure however, if the mysql databases is copIed over as well.

John

CPanel/WHM would copy all data and MySQL database without any problem. I did that a few days ago .

nogi
07-23-2002, 03:53 PM
CPanel/WHM would copy all data and MySQL database without any problem. I did that a few days ago

Thanks! - what about email then? Should on pay special attention to that - I've heard that this could cause some problems.

John

Dedicated
07-23-2002, 04:01 PM
I did not have any problem when I did copy a few sites. WHM did copy all emails, auto-responders and .....etc.

brandon
07-24-2002, 02:54 AM
I did not have any problem when I did copy a few sites. WHM did copy all emails, auto-responders and .....etc.

If you are just having reseller account and NOT Dedicated, you don have access to that function.

I have used the Backup Function in CPanel, it works for the site and email, but NOT email forwarding.

Then use the Restore Function on the New server and restore the files.

For MySQL I have yet to try it out.

nogi
07-24-2002, 05:25 AM
If you are just having reseller account and NOT Dedicated, you don have access to that function.

Yes - unless you have a helpfull host :) - they will be doing it for me - I'm not leaving them, just spreading clients to different baskets.

John

nightowl
07-31-2002, 01:05 PM
Originally posted by nogi
Thanks! - what about email then? Should on pay special attention to that - I've heard that this could cause some problems.

I just tried the tar -zvcf/-zxvf method, and it was a very quick, easy method of transferring - however, I did have a problem with the email addresses. I'm not sure why, but any pre-existing, transferred accounts could send, but they could not receive (they'd bounce).

There was a relatively simple solution though - just change the password on each email account. It beats having to delete/recreate them. :)

The rest of the transfer went miraculously well.