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.

Transfer an account from old server.

Discussion in 'General Discussion' started by chandro, Jan 9, 2010.

  1. chandro

    chandro Well-Known Member

    Joined:
    Nov 21, 2005
    Messages:
    99
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    /home/chandro
    cPanel Access Level:
    Root Administrator
    Hi guys, im trying to transfer one account from my old server and i get errors. in this part.

    Doing fileprotect conversion
    [an error occurred while processing this directive]

    click on it and appears this :

    Can't stat /home/sdserver/public_html: No such file or directory File::Find::_find_opt('HASH(0x9e5f770)', '/home/sdserver/public_html') called at /usr/local/cpanel/perl/File/Find.pm line 743 File::Find::find('HASH(0x9e5f770)', '/home/sdserver/public_html') called at /usr/local/cpanel/Whostmgr/Transfers.pm line 1240 Whostmgr::Transfers::__ANON__() called at /usr/local/cpanel/Cpanel/AccessIds.pm line 72 Cpanel::AccessIds::do_as_user_group(628, 99, 'CODE(0x9e60c64)') called at /usr/local/cpanel/Whostmgr/Transfers.pm line 1247 Whostmgr::Transfers::restorecpmove('stream', 'HASH(0x9d009c4)', 'restorereseller', 'y', 'olduser', 'sdserver', 'override', '', ...) called at whostmgr/bin/whostmgr5 line 1442 main::copyacct() called at whostmgr/bin/whostmgr5 line 222

    everything continues ok

    Transfer Complete
    Account Copy Process Complete

    but if you try to access the site, the cpanel page appears. if you login via ssh and go to /home/sdserver there is no files.


    ok, i erase all, terminate account and then try to do it via SSH:
    make my package:

    /scripts/pkgacct sdserver

    transfer it to the other server, and in the "Restore a Full Backup/cpmove file" Option i see the file there, and click on restore.

    no errors, everything looks good, but when i try to access the site, nothing there, i enter via ssh and /home/sdserver is empty

    what to do???

    thanks guys
     
  2. madaboutlinux

    madaboutlinux Well-Known Member

    Joined:
    Jan 24, 2005
    Messages:
    1,052
    Likes Received:
    2
    Trophy Points:
    38
    Location:
    Earth
    The error says "Can't stat /home/sdserver/public_html: No such file or directory". Are you sure it's present on the old server? If yes, try the following to migrate the account:

    1. Login to old server as root
    2. move the home directory of the account to bak something like /home/sdserver_bak
    3. create an empty home directory for the account: mkdir /home/sdserver
    4. /scripts/pkgacct sdserver
    5. copy the backup on the new server.
    6. remove the empty home directory of the account and rename /home/sdserver_bak to /home/sdserver

    7. Login to the new server
    8. Restore the account: /scripts/restorepkg sdserver
    9. Now, rsync the home directory of the account from the old server:

    rsync -av -e "ssh -p 22" root@oldserverip:/home/sdserver /home/

    That's it.

    This will make sure the account is created properly on the new server with all the old settings and then you will have the accounts home directory copied over.
     
  3. chandro

    chandro Well-Known Member

    Joined:
    Nov 21, 2005
    Messages:
    99
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    /home/chandro
    cPanel Access Level:
    Root Administrator
    failed: Disk quota exceeded (122)
    rsync: chown "/home/sdserver/public_html/administrator/components/com_cache/admin.cache.php" faile
    d: Disk quota exceeded (122)
    rsync: chown "/home/sdserver/public_html/administrator/components/com_cache/cache.class.php" faile
    d: Disk quota exceeded (122)


    i do "df -h" on both servers and:

    NEW SERVER
    root@xela [/home]# df -h
    Filesystem Size Used Avail Use% Mounted on
    /dev/simfs 90G 37G 54G 41% /
    none 3.0G 4.0K 3.0G 1% /dev

    OLD SERVER
    root@kripton [/home/sdserver]# df -h
    Filesystem Size Used Avail Use% Mounted on
    /dev/simfs 50G 19G 32G 38% /
    none 3.0G 4.0K 3.0G 1% /dev


    if i go to /scripts/fixquotas i get this:

    edquota: Cannot set quota for user 623 from kernel on /dev/simfs: No such process
    edquota: Can't write quota for 623 on /dev/simfs: No such process
    Resetting quota for oscar to 1000 M
    Resetting quota for parnassu to 1000 M
    Resetting quota for playa to 200 M
    Resetting quota for presiden to 1000 M
    Resetting quota for pubdur to 200 M
    Resetting quota for puebla to 400 M
    edquota: Cannot set quota for user 627 from kernel on /dev/simfs: No such process
    edquota: Can't write quota for 627 on /dev/simfs: No such process
    Resetting quota for radiomor to 200 M
    Resetting quota for redmex to 1000 M
    Resetting quota for roberto to 500 M
    Resetting quota for rvadmin to 0 M
    Resetting quota for sanjuand to 0 M
    Resetting quota for sanmigue to 1000 M
    Resetting quota for sdserver to 10000 M
    edquota: Cannot set quota for user 630 from kernel on /dev/simfs: No such process
    edquota: Can't write quota for 630 on /dev/simfs: No such process
    Resetting quota for semer to 500 M


    maybe, is there mounted dont let me do this??
     
  4. dave_g

    dave_g Registered

    Joined:
    Jan 10, 2010
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Hello, I have to transfer accounts too and your way of proceed is working for me but I need some explainations about some steps.

    Step 2: why do you create a directory_bak, if I want transfer the complete website, may I directly do the line: /scripts/pkgacct sdserver

    Step 9: I don't understand the need of this resynchronisation, could you explain me the principle, the goal. If I don't rsync, what kind of problems I will encountered?
     
  5. madaboutlinux

    madaboutlinux Well-Known Member

    Joined:
    Jan 24, 2005
    Messages:
    1,052
    Likes Received:
    2
    Trophy Points:
    38
    Location:
    Earth
    This needs to be done only when an account is in GBs. Yes, you can use

    /scripts/pkgacct username

    directly but it may take hours and in case the session disconnects for some reason, you have to start all over again. This is the reason why I asked to move to rename the home directory of the account to bak and create an empty directory, so the account is backed up and restored in a few minutes.

    Then you have to remove the empty directory and rename the bak directory. Now, since the account on the new server will have an empty directory, you have to rsync the accounts home directory from the old server.

    rsync will move the data for you from old to the new server and even if the session/command disconnects, rsync will start from where it has left and will make sure everything is migrated properly.
     
  6. chandro

    chandro Well-Known Member

    Joined:
    Nov 21, 2005
    Messages:
    99
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    /home/chandro
    cPanel Access Level:
    Root Administrator
    you can leave it on the background with this:


    nohup nice -19 /scripts/pkgacct username &
     
Loading...

Share This Page