webdave

Active Member
Jul 4, 2002
25
0
151
I need to transfer about 13 sites from one machine to another. I have root access on the new machine but I don't have it on the old machine. That means I can't use the WHM transfer utility. If I login to Cpanel and use the backup command from there will it backup the site, emails, and SQL databases? Will I then be able to use that and simply restore the backup on the new machine?
 

hst

Well-Known Member
Feb 24, 2002
111
0
316
Account moves

If you want you can move them each one by one with SSH. I will post the details of how to do this if your interested. You have to have access to each site by SSH but don't need root access to the old server. Just let me know if you need the detail of doing it this way.
 

hst

Well-Known Member
Feb 24, 2002
111
0
316
Here you go

Go into webhost manager and creat the new accounts on the new server.

SSH in to the account on the old server and tar the directory that the website is on. Example:

type
tar -zcf website.tar.gz public_html
That will create a tar file for the public_html directory

type
ftp xxx.xxx.xxx.xxx
(this is the new ip for the account you created on the new server)

It will request your login info for the new server and just put it in.

type
put website.tar.gz
(this will put the file on the website on your new server)

Type
e ( this will take you out of FTP)
Type
Exit and you will be out of the session.

Log in SSH to the IP for the site on your new server.
Type
gunzip website.tar.gz

Type
tar -xvf website.tar
This will extract the file to the site in the public_html directory.

One note it will not move MySQL so you will have to do that manually if you have any on the site but it will move everything else. keep the same username and password on the new server when you setting up the accounts and the scripts will usually keep working fine and you will be in business. Don't forget to make any nameserver changes for the domain name if your using different DNS. If you move it and then make the nameserver changes you will normally have no downtime for the site.

Have a great week!
 

webdave

Active Member
Jul 4, 2002
25
0
151
Thank you very much. That will help me out a lot. One quick question just to confirm will this transfer email settings as well?
 

sodapopinski

Well-Known Member
Aug 13, 2001
91
2
308
[quote:9cebdb5a27][i:9cebdb5a27]Originally posted by webdave[/i:9cebdb5a27]
Thank you very much. That will help me out a lot. One quick question just to confirm will this transfer email settings as well?[/quote:9cebdb5a27]

As far as I know, if you need to transfer mail conf you need to tar gz /home/username/mail as well as /home/username/etc.
Also you need to copy /etc/valiases/theirdomain.com into your new server.

Good luck.
 

hst

Well-Known Member
Feb 24, 2002
111
0
316
Email

After we tar the public_html we just ask the client to go in and set up the additional settings such as email through the control panel: http://xxx.xxx.xxx.xxx:2082
We've found most of our clients like to work on those settings themselves.

BTW, while the domain is propogating to the new nameserves they can use the accounts IP as the mail server to pull mail off the old system to be sure they got everything during the transition before the old account is deleted. It usually takes 2 or 3 days for nameserver changed to propogate.

The public_html is all we tar over. We also use the same username and password so any scripts they have will normally continue to work.
 

ecoutez

Well-Known Member
May 23, 2002
152
0
316
As long as you have ssh access...

If you have SSH access on the old server, you could use SCP or RSync (over SSH) which would be simpler. If you wanted to copy the contents of public_html from old to new server, you can do this...

1 - Login to the new server
2 - scp -prC ro[email protected]:/home/username/public_html /home/username/

Check out the man page on scp. You can actually move data from server A to server B while you're logged into server C. Just specify the source and target in [email protected] format and it works fine.

Personally when I'm moving accounts like this (and I've been doing a lot of them recently) I use rsync to sync up the user's public_html directory on the old server to the new one. Then I show them their new account, get an okay to make the change, and sync once more. I've been syncing to a seperate /backup directory like:

rsync -avz -e ssh [email protected]:/home /backup/oldserver/

This will sync up the entire home directories from the old server to /backup/oldserver/ on the new one. Then it's just a matter of copying the files over. You can run rsync via cron and it will just update the changes rather than copy all the files every time.

- Jason
 

TheVoice

Well-Known Member
Feb 7, 2002
105
0
316
sometimes I&ll make a tar.gz archive and transfer it using the wget. thats probably the safest way to transfer plus you get to see how fast its transfering :)