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.

The restore failed because the username “xxxx” is invalid or not an existing cPanel user.

Discussion in 'Data Protection' started by nyjimbo, Sep 20, 2014.

  1. nyjimbo

    nyjimbo Well-Known Member

    Joined:
    Jan 25, 2003
    Messages:
    1,125
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    New York
    Customer calls up and says he totally screwed up his account by deleting stuff during FTP. Wants us to reload a backup. No problem we have backups. I check his remaining file structure and its all messed up so I delete the account via WHM. I then go to WHM -> Backups -> Restore Backup.

    I pick the account name, select the date (there are several) add it to the queue and hit restore. I then get this (actual account name replaced with xxx) :

    I try it with different dates, same result. I figure, ok, manually create account, cant do that because "account already exists" which it does not. Try to delete account and its not listed. No file structure exists for that account in "/home2"

    Server is running CENTOS 6.5 x86_64 standard WHM 11.44.1 (build 17)

    So where do I go from here ?
     
    #1 nyjimbo, Sep 20, 2014
    Last edited: Sep 20, 2014
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Does the username exist in /etc/passwd or /etc/group after terminating it? EX:

    Code:
    grep user /etc/passwd
    grep user /etc/group
    Thank you.
     
  3. nyjimbo

    nyjimbo Well-Known Member

    Joined:
    Jan 25, 2003
    Messages:
    1,125
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    New York
    I opened a ticket on sunday. The tech noticed that it still existed even though it was not listed via whm. The solution was

    grep -i username /etc/passwd
    (it was in the passwd file)
    username:x:856:855::/home2/username:/sbin/nologin​
    You will want to run the following command:

    userdel username​

    Additionally, you will need to remove the following line from /etc/dbowners for the restore to complete:

    grep -i username /etc/dbowners
    username: username​

    After doing the userdel AND deleting that user from /etc/dbowners I was able to do the full restore.
     
    #3 nyjimbo, Sep 22, 2014
    Last edited: Sep 22, 2014
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page