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.

Should I do "copy account with username & password" from 1 server to anothe

Discussion in 'Workarounds and Optimization' started by calvinphanctt, Apr 22, 2012.

  1. calvinphanctt

    calvinphanctt Active Member

    Joined:
    Mar 27, 2007
    Messages:
    44
    Likes Received:
    0
    Trophy Points:
    6
    Dear all,

    I'm sorry I don't know where to ask this question, so I post it here, if it's not in the right place, please go ahead move it (but don't delete it :) ).

    I have 2 dedicated servers, and I want to transfer all accounts from OLD server to the NEW server. One of the account, let say: mybigwebsite.com its size about 40 GB. Should I download everything from this website to my computer, then create the same account in the NEW server and upload everything I just back up to it OR should I from the WHM do "copy account with username & password" to copy that account from OLD server to NEW server ?

    Which way is faster ?

    Sincerely,
    Calvin
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Re: Should I do "copy account with username & password" from 1 server to an

    Hi Calvin,

    If the user's home directory is what is so large, then you could use WHM > Transfers > Copy multiple accounts/packages from another server area, then select to Skip Homedir when you've connected to pull up the other server's (the old server) accounts. By skipping the user's home directory, you can then scp or rsync over that data after you've packaged the account.

    To scp it, you'd simply do on the old server:

    Code:
    scp -pr /home/username/* root@newserver:/home/username
    Simply replace username with the cPanel username and newserver with the IP of the new server.

    Thanks!
     
  3. NetMantis

    NetMantis BANNED

    Joined:
    Apr 22, 2012
    Messages:
    117
    Likes Received:
    0
    Trophy Points:
    0
    Location:
    Utah
    cPanel Access Level:
    DataCenter Provider
    Re: Should I do "copy account with username & password" from 1 server to an

    If that account really is 40 GB, it really should be on a dedicated server by itself.

    That is enormously huge for a shared hosting website.

    Now with that said, I'd make the same recommendation as cPanelTristan in terms of transferring the site.

    Copy the username and settings without any data first and then use either scp or rcp to copy the data from the old account to the new account from within ssh. That will definitely be the fastest way to do all of that.

    If you have any backups or old unread mail, you might be able to trim some of the size of that account using the following:

    # find /home/(USERNAME)/mail/new -maxdepth 1 -type f -mtime +21 -print -delete
    # find /home/(USERNAME)/mail/.[a-z]*/new -maxdepth 1 -type f -mtime +60 -print -delete
    # find /home/(USERNAME) -maxdepth 2 -type f -name 'backup-*.tar.gz' -print -delete

    The above would delete unread mail in the general mailbox older than 3 weeks (21 days) and any normal mailbox with unchecked unread mail longer than 2 months and would also delete any old cpanel backup archives that you have sitting in the account.

    The above can sometimes make a substantial difference in the size of the hosting account.

    Optimizing images using ImageMagicK or most any photo editor can also help reduce physical data sizes and make the account run faster and keep the size of the files smaller.

    Likewise if you have a large MySQL database, you might find tables or fields with unnecessary data such as long log histories, etc. The larger the database, the slower it's performance will be so reducing excess data can actually be very beneficial as well as optimizing tables and / or keeping indexes updated as well.

    All of the above is just a suggestion ....

    After you've tried some of those though, you might find that scp or rcp transfer might go much faster for you.
     
    #3 NetMantis, Apr 23, 2012
    Last edited: Apr 23, 2012
  4. Fusion6

    Fusion6 Member

    Joined:
    Oct 9, 2012
    Messages:
    21
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Reseller Owner
    Re: Should I do "copy account with username & password" from 1 server to an

    Sorry to butt in here but I have a similar problem where I need to transfer an account of over 35Gb from one server to another. In my case when I try to do the copy account with password thing it connects fine and goes through the creating a backup thing but then when the actually transfer starts I receive an error "information about the primary domain is either missing or corrupt".

    I understand about copying just the account details across and then using scp or rcp to copy the data to the new server however my old Cpanel does not have SSH and am I right in thinking this is what I would need in order to perform scp or rcp?
     
  5. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Re: Should I do "copy account with username & password" from 1 server to an

    Yes, you are correct in that you'd need SSH access to perform either scp or rsync on the old machine to the new one.
     
Loading...

Share This Page