Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Transfer Tool unable to overwrite duplicate username

Discussion in 'Data Protection' started by katmai, Mar 29, 2019.

  1. katmai

    katmai Well-Known Member

    Joined:
    Mar 13, 2006
    Messages:
    551
    Likes Received:
    2
    Trophy Points:
    168
    Location:
    Brno, Czech Republic
    i am experiencing the same issue @cPanelMichael

    i have 2 whm servers. i cloned 3 accounts from server 1 to server 2
    i made some updates on server 1 to these accounts, so i used whm to terminate them from server 2
    then i used transfer tool to try to copy them to server2 again and i am getting:
    ------------------------------------------------
    Error: You have selected 2 accounts that cannot transfer properly because their usernames conflict with usernames on the local server.

    • The remote account “account1” cannot transfer because an account with the same username exists on the local server.
    • The remote account “account2” cannot transfer because an account with the same username exists on the local server.

    Overwrite conflicted accounts

    Deselect conflicted accounts
    ------------------------------------------------
    Selecting overwrite gives me this:

    RESTORE: Account “account1”: Account Restore Failed: “Homedir failure: Security violation: The home directory was not provided.”
    The “Homedir” restore module failed because of an error: Security violation: The home directory was not provided.
    RESTORE: Account “account2”: Account Restore Failed: “Homedir failure: Security violation: The home directory was not provided.”
    The “Homedir” restore module failed because of an error: Security violation: The home directory was not provided.

    this is happening with both servers being
    • v78.0.18
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #1 katmai, Mar 29, 2019
    Last edited by a moderator: Mar 29, 2019
  2. katmai

    katmai Well-Known Member

    Joined:
    Mar 13, 2006
    Messages:
    551
    Likes Received:
    2
    Trophy Points:
    168
    Location:
    Brno, Czech Republic
    @cPanelMichael - Just a small update on this matter: i was able to do manual pkgacct snapshots and transfer them over and restore them with the "restore a full backup/cpmove file" but i have about 500 accounts to transfer - i'd love it if the transfer tool would work so i don't have to do this manually.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    5,715
    Likes Received:
    436
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @katmai

    Since you got the problematic accounts moved, is this occurring with accounts that you've not attempted to transfer before? It sounds like there may have been a conflict due to the accounts having cruft or leftover data on the destination server.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. katmai

    katmai Well-Known Member

    Joined:
    Mar 13, 2006
    Messages:
    551
    Likes Received:
    2
    Trophy Points:
    168
    Location:
    Brno, Czech Republic
    it hasn't happened with accounts that were never moved before. only with accounts that i transferred, tested if things work properly, then deleted them and retried the transfer 2-3 days later.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    5,715
    Likes Received:
    436
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @katmai

    So two ways to go about this here

    1. And this is my suggested method: I'd like to see if you can open a ticket so that we can find out why when you're removing the accounts they aren't being fully removed. If you choose to do this you can do so using the link in my signature. Please post the ticket ID here as well so that we can update this thread with the outcome.

    2. You could do some testing on your own with a tool we use internally:

    a. Step one transfer an account
    b. remove the account
    c. Attempt to transfer again
    d. If the transfer fails - run the following to see what cruft is being left over:

    Code:
               /usr/local/cpanel/3rdparty/bin/perl <(curl -s https://raw.githubusercontent.com/cPanelInc/tech-acctinfo/master/acctinfo)
    As well as check cPanel error logs for errors when the account has been removed.


    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. katmai

    katmai Well-Known Member

    Joined:
    Mar 13, 2006
    Messages:
    551
    Likes Received:
    2
    Trophy Points:
    168
    Location:
    Brno, Czech Republic
    perfect, thanks, i will do this the next time it happens.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. AngryDragon

    AngryDragon Registered

    Joined:
    Apr 5, 2019
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Gouda
    cPanel Access Level:
    Root Administrator
    Excuse me for interfering in your thread.

    I have exactly the same issue: migrating from one server to another, using test accounts.
    deleting that account on the new server, and trying to redo the transfer.
    getting "username conflicts with a username on the local server" and continuing with 'overwrite' resulting in "Account Restore Failed: Homedir failure: Security violation: The home directory was not provided.”
    (v78.0.20 btw)

    cPanelLauren's suggestion (acctinfo) with parameters --cruft <user>, found leftovers in "/var/cpanel/users" where a file exists with the accountname which should have been gone.

    manually removed that file.
    still the same warnings / errors.
    acctinfo cruft finds nothing anymore.

    any suggestions?
     
  8. Peoplespaces

    Peoplespaces Well-Known Member

    Joined:
    Oct 1, 2001
    Messages:
    250
    Likes Received:
    4
    Trophy Points:
    318
    cPanel Access Level:
    Root Administrator
    I have the same issue. Looking for a solution.
     
  9. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    5,715
    Likes Received:
    436
    Trophy Points:
    233
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    @AngryDragon and @Peoplespaces what versions of cPanel are you using?

    If accntinfo finds nothing and you run the following:

    Code:
    /scripts/updateuserdomains
    /scripts/updateuserdatacache
    mv /etc/apache2/conf/httpd.conf{,.bk}
    /scripts/restartsrv_httpd
    /scripts/rebuilddnsconfig
    Do you get the same error?

    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  10. Peoplespaces

    Peoplespaces Well-Known Member

    Joined:
    Oct 1, 2001
    Messages:
    250
    Likes Received:
    4
    Trophy Points:
    318
    cPanel Access Level:
    Root Administrator
    • CLOUDLINUX 7.6 [s319]

    • v78.0.20
    • After running the five commands, I get the same error.
     
  11. AngryDragon

    AngryDragon Registered

    Joined:
    Apr 5, 2019
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Gouda
    cPanel Access Level:
    Root Administrator
    Im on v78.0.20 also. But it also happens on v78.0.18.

    Will try the commands tomorrow and give feedback here.
     
  12. AngryDragon

    AngryDragon Registered

    Joined:
    Apr 5, 2019
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Gouda
    cPanel Access Level:
    Root Administrator
    Started over with a new / fresh VPS with v78.0.20:

    1 Used the transfer tool for 1 account from source to the new / fresh target
    2 checked / tested account on new fresh target: all data moved - working as expected
    3 deleted account on new fresh target (using account panel / terminate): sucessful deleted in logfiles.
    4 restarted transfer tool for same account

    well, all as noted above in my messages and in PeopleShares messages.
    even after the scripts and the cruft check same errormessages come up and transfer failes to restore.

    seems to me that either one of the following is occuring:
    - delete / terminate account is not deleting completely although log sais it did.
    - transfer tool is checking for available user where it shouldnt.
    - transfer tool is checking for available user where 'cruft' check doesnt look.
    - transfer tool: homedirectory is not taken in account when transferring for an existing account.

    not much more i can do for now :(
     
  13. Peoplespaces

    Peoplespaces Well-Known Member

    Joined:
    Oct 1, 2001
    Messages:
    250
    Likes Received:
    4
    Trophy Points:
    318
    cPanel Access Level:
    Root Administrator
    Any updates on this from cPanel staff?
     
  14. unigen

    unigen Member

    Joined:
    Mar 8, 2015
    Messages:
    12
    Likes Received:
    2
    Trophy Points:
    3
    Location:
    New Delhi, India
    cPanel Access Level:
    Root Administrator
    Hi,
    Here's what I did: I deleted the account. Recreated it with same package. Then attempted the transfer, and it worked.
     
    cPanelLauren likes this.
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice