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.

restorepkg home directory already exists

Discussion in 'General Discussion' started by sparek-3, May 28, 2009.

  1. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,384
    Likes Received:
    23
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    When did /scripts/restorepkg change to not restore accounts if the home directory for that username already exists in /home?

    For example, say I am wanting to restore the backup sunshine.tar.gz. If /home/sunshine already exists, restorepkg won't restore this. How do I get it to?

    I have tried /scripts/restorepkg --force sunshine that doesn't work. I've tried /scripts/restorepkg --override sunshine and /scripts/restorepkg --override -force sunshine and neither of those work.

    Is this a bug in the restorepkg script?

    My cPanel version is 11.24.4-RELEASE_36167
     
  2. viraj

    viraj Well-Known Member

    Joined:
    Sep 28, 2006
    Messages:
    209
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    India
    cPanel Access Level:
    DataCenter Provider
    Twitter:
    Can you provide us the exact error message you receive when you try to restore the backup package..? Also, try moving the /home/sunshine folder to /home/sunshine-bak & then restoring the package..
     
  3. sparek-3

    sparek-3 Well-Known Member

    Joined:
    Aug 10, 2002
    Messages:
    1,384
    Likes Received:
    23
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    The error message is:

    Generating Account....Account Creation Status: failed (Sorry, the home directory for this user ( /home/sunshine ) already exists. Please move or delete it and try again or use the force option if available.)

    I did eventually redesign the procedure I was using to rename the user's home directory and then move it back after the restore.

    But shouldn't passing the --force or --override options allow this to go through without having to rename the directory? That's why I'm wondering if this is a bug or oversight on the developer's part.
     
  4. crazyaboutlinux

    crazyaboutlinux Well-Known Member

    Joined:
    Nov 3, 2007
    Messages:
    938
    Likes Received:
    0
    Trophy Points:
    16
    Did you tried to restore backup from WHM ??
    if not try this Main >> Backup >> Restore Backups
     
  5. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,461
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    The --force parameter is broken in latest cPanel 11.24 builds due to some extra safeguards added to account creation policies. This parameter is fixed in EDGE and will be pushed to other branches at a future date.
     
  6. crazyaboutlinux

    crazyaboutlinux Well-Known Member

    Joined:
    Nov 3, 2007
    Messages:
    938
    Likes Received:
    0
    Trophy Points:
    16
    Thanks for the update & information
     
  7. jfw

    jfw Registered

    Joined:
    Nov 18, 2009
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Any update on this? It appears to still be broken.

    edit- working in 'current' cPanel 11.25.0-C40255, but not in 'stable' (not sure of version number)
     
    #7 jfw, Nov 30, 2009
    Last edited: Dec 1, 2009
Loading...

Share This Page