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.

copying an account to new server via SSH

Discussion in 'Data Protection' started by alexgol, Jul 31, 2009.

  1. alexgol

    alexgol Member

    Joined:
    Dec 21, 2006
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    I am trying to copy an account from an old server to my new server. I did a search on this forum and the easiest one I found was:

    1. Log into the server that your copying the accounts from via SSH
    2. type '/scripts/pkgacct [username]'
    3. type 'scp cpmove-[username].tar.gz root@[NEWSERVERIP]:/home/'
    4. Log into the [NEWSERVER] via SSH
    5. type '/scripts/restorepkg [username]'

    However I am getting stuck at no.3
    3. type 'scp cpmove-[username].tar.gz root@[NEWSERVERIP]:/home/'

    When I apply this after about 20 seconds I get the following message:

    root@sun [~]# scp cpmove-*****.tar.gz root@**.**.**.***:/home/
    ssh: connect to host **.**.**.*** port 22: Connection timed out
    lost connection

    (for security reason I have replaced my account name and IP)

    I know for a fact that on the new server the SSH allows me to login without any problems. The firewall also is off.

    Has anyone experienced this before? any feedback would be highly appreciated.
    thanks
     
  2. Eric

    Eric Administrator
    Staff Member

    Joined:
    Nov 25, 2007
    Messages:
    746
    Likes Received:
    11
    Trophy Points:
    18
    Location:
    Texas
    cPanel Access Level:
    Root Administrator
    Howdy,

    Can you ssh from server to server on each of these?

    Thanks!
     
  3. alexgol

    alexgol Member

    Joined:
    Dec 21, 2006
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    if you mean if I can ssh both servers then yes I can.

    Also after trying several times I now get the following error:

    cp: cannot stat `cpmove-******.tar.gz': No such file or directory

    really strange!!

    I restarted the process from the beginning and still get the same error as above.

    thanks for your input
     
  4. Eric

    Eric Administrator
    Staff Member

    Joined:
    Nov 25, 2007
    Messages:
    746
    Likes Received:
    11
    Trophy Points:
    18
    Location:
    Texas
    cPanel Access Level:
    Root Administrator
    Howdy,

    I was asking more along the lines of, can serverA ssh to serverB, and so forth. But it sounds like you may not have a cpmove file. Do you have /home2 or /home3, look in those too?

    Thanks!
     
  5. alexgol

    alexgol Member

    Joined:
    Dec 21, 2006
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    Hi Eric,

    I tried to do a WHM backup even though both WHM are same versions still got an error message:

    Testing **.**.**.*** for xfer streaming support....Supported!
    Packaging the account... The password you provided is not correct.

    Trace Output: (
    sshcmdpermissiondeny)


    But I know for a fact that the password is correct.

    As for home, according to my setup, it shows /home and no other names.

    thanks
     
  6. alexgol

    alexgol Member

    Joined:
    Dec 21, 2006
    Messages:
    20
    Likes Received:
    0
    Trophy Points:
    1
    can anyone suggest a way out of this?

    I'm getting the following error

    root@sun [/home]# cp cpmove-*****.tar.gz root@**.**.**.***/home/
    cp: cannot create regular file `root@**.**.**.***/public_html/cpmove-****.tar.gz': No such file or directory
    root@sun [/home]#

    what am I doing wrong?
     
  7. Provim

    Provim Member

    Joined:
    Aug 18, 2009
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    I would definitely be interested if someone gets this working. I have the same errors when trying to scp.
     
  8. xvihost

    xvihost Active Member

    Joined:
    Sep 8, 2005
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    I know this post is old, but in this particular case you are missing the colon ( : ) between the IP and path. It should be:

    cp cpmove-*****.tar.gz root@**.**.**.***:/home/
     
    #8 xvihost, Jul 15, 2010
    Last edited: Jul 15, 2010
Loading...

Share This Page