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.

Restore account...

Discussion in 'General Discussion' started by allenhui, Dec 24, 2003.

  1. allenhui

    allenhui Well-Known Member

    Joined:
    Aug 17, 2003
    Messages:
    105
    Likes Received:
    0
    Trophy Points:
    16
    I can't restore an account with a - inside the login name,how can i fix this problem?
     
  2. vishal

    vishal Well-Known Member

    Joined:
    Jan 28, 2003
    Messages:
    340
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    Restore it manually :)

    Create the account from WHM first without a -
    The delete all the folders rm -rf /home/user/*

    copy all the files from
    cp -Rp /backup/cpbackup/dail/user/homedir/* /home/user/

    Then goto WHM = Account Functions => Modify Account =>
    Change the username with -

    But make sure to restore the Mysql database also like

    mysql -uroot -p mysql < /backup/cpbackup/daily/user/mysql.sql

    //The above will add your user details and privileages to mysql db. if not then you may have create the Mysql users from the control panel.


    and copy the folders from /backup/cpbackup/daily/user/mysql/
    to /var/lib/mysql

    Hope this helps ! :cool:

    Thank you,
     
  3. allenhui

    allenhui Well-Known Member

    Joined:
    Aug 17, 2003
    Messages:
    105
    Likes Received:
    0
    Trophy Points:
    16
    Thank You~But i still can't fix the problem yet.

    Can you teach me more detail?
     
    #3 allenhui, Dec 25, 2003
    Last edited: Dec 25, 2003
  4. vishal

    vishal Well-Known Member

    Joined:
    Jan 28, 2003
    Messages:
    340
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    Paste the erros you get while Restoring (Manul or WHM).

    Thank you,
     
  5. allenhui

    allenhui Well-Known Member

    Joined:
    Aug 17, 2003
    Messages:
    105
    Likes Received:
    0
    Trophy Points:
    16
    i can find the folder in /home/user..
    it seems all the account is in /home
     
  6. vishal

    vishal Well-Known Member

    Joined:
    Jan 28, 2003
    Messages:
    340
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    Yes all accounts are in /home only

    When you create a account through WHM it create a Folder with the username in /home

    that is why i said /home/<username> or /home/<user>

    also paste the errors that you get while restoring the account.

    Thanks.
     
  7. allenhui

    allenhui Well-Known Member

    Joined:
    Aug 17, 2003
    Messages:
    105
    Likes Received:
    0
    Trophy Points:
    16
    But i still can't fix the problem.

    Can you show me the step of restore back the - account plx?
     
  8. allenhui

    allenhui Well-Known Member

    Joined:
    Aug 17, 2003
    Messages:
    105
    Likes Received:
    0
    Trophy Points:
    16
    When i type the command

    cp -Rp /backup/cpbackup/dail/user/homedir/username/home

    error are show:

    cp: missing destination file
    Try `cp --help' for more information.
     
  9. vishal

    vishal Well-Known Member

    Joined:
    Jan 28, 2003
    Messages:
    340
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    OK... ;)

    1. Login to http://servername:2086
    2. Create a Account you want to restore with the username (Without a DASH).
    3. SSH to server with root
    4. cd /home
    5. rm -rf username/*
    6. cd /backup/cpbackup/daily/user-name
    7. cp -Rp homedire/* /home/username/
    8. cp -Rp mysql/* /var/lib/mysql/
    9. mysql -uroot -p <if root has passwd> mysql < mysql.sql
    10. login to WHM ==> 'Account Functions' ==> 'Modify Account' ==> Change the username with user-name (i.e with a DASH)

    But this will change the passwd for the user or else if you know the passwd for that user then use the same password while creating the account.
     
  10. allenhui

    allenhui Well-Known Member

    Joined:
    Aug 17, 2003
    Messages:
    105
    Likes Received:
    0
    Trophy Points:
    16
    Thank you for your help.I have sloved the problem.
     
    #10 allenhui, Dec 26, 2003
    Last edited: Dec 26, 2003
  11. Website Rob

    Website Rob Well-Known Member

    Joined:
    Mar 23, 2002
    Messages:
    1,506
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    Alberta, Canada
    cPanel Access Level:
    Root Administrator
    allenhui, you posted on a problem you were having, got some helpful replies, then stated you sovled the problem. Although that's good for you, common courtesy would suggest you also post what method worked for you.

    Others reading this thread may also solve their problem using your method, or the others posted, and that, after all, is what a Forum is all about. :)
     
  12. vishal

    vishal Well-Known Member

    Joined:
    Jan 28, 2003
    Messages:
    340
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    I Second Website Rob :)

    Always post what method worked for u.
     
  13. myusername

    myusername Well-Known Member
    PartnerNOC

    Joined:
    Mar 6, 2003
    Messages:
    691
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    chown -R us.*yourbase*
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    here is what worked for me, less the typos.....

    For the files in the user's home directory:

    1. Login to http://servername:2086
    2. Create a Account you want to restore with the username (Without a DASH).
    3. SSH to server with root
    4. cd /home
    5. rm -rf username/*
    6. cd /backup/cpbackup/daily/user-name
    7. cp -Rp homedir/* /home/username

    Now thats all good. I got a bit lost in how to get the mysql for the site back up.

    When I run step 8 right after step 7:

    8. cp -Rp mysql/* /var/lib/mysql/

    I get:
    cp: cannot stat `/mysql/*': No such file or directory

    Perhaps this site did not have any databases, I cannot say for sure. Is the command above correct?

    How about step 9? Anyone care to explain this a bit better....

    9. mysql -uroot -p <if root has passwd> mysql < mysql.sql

    I dont understand what is trying to be explained with the "><" tags.


    :)
     
Loading...

Share This Page