The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Site Transfer

Discussion in 'General Discussion' started by webdave, Jul 13, 2002.

  1. webdave

    webdave Active Member

    Joined:
    Jul 4, 2002
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    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?
     
  2. hst

    hst Well-Known Member

    Joined:
    Feb 24, 2002
    Messages:
    111
    Likes Received:
    0
    Trophy Points:
    16
    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.
     
  3. webdave

    webdave Active Member

    Joined:
    Jul 4, 2002
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    Yes I'd be interested. I have PM'd you.
     
  4. hst

    hst Well-Known Member

    Joined:
    Feb 24, 2002
    Messages:
    111
    Likes Received:
    0
    Trophy Points:
    16
    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!
     
  5. webdave

    webdave Active Member

    Joined:
    Jul 4, 2002
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    Thank you very much. That will help me out a lot. One quick question just to confirm will this transfer email settings as well?
     
  6. sodapopinski

    sodapopinski Well-Known Member

    Joined:
    Aug 13, 2001
    Messages:
    79
    Likes Received:
    0
    Trophy Points:
    6
    [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.
     
  7. hst

    hst Well-Known Member

    Joined:
    Feb 24, 2002
    Messages:
    111
    Likes Received:
    0
    Trophy Points:
    16
    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.
     
  8. ecoutez

    ecoutez Well-Known Member

    Joined:
    May 23, 2002
    Messages:
    152
    Likes Received:
    0
    Trophy Points:
    0
    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 root@old.servername.com:/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 username@servername.com 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 root@old.servername.com:/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
     
  9. TheVoice

    TheVoice Well-Known Member

    Joined:
    Feb 7, 2002
    Messages:
    105
    Likes Received:
    0
    Trophy Points:
    16
    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 :)
     
Loading...

Share This Page