restorepkg home directory already exists

sparek-3

Well-Known Member
Aug 10, 2002
2,126
258
388
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
 

viraj

Well-Known Member
Sep 28, 2006
209
3
168
India
cPanel Access Level
DataCenter Provider
Twitter
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
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..
 

sparek-3

Well-Known Member
Aug 10, 2002
2,126
258
388
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.
 

crazyaboutlinux

Well-Known Member
Nov 3, 2007
939
1
66
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.
Did you tried to restore backup from WHM ??
if not try this Main >> Backup >> Restore Backups
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,607
80
458
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.
 

crazyaboutlinux

Well-Known Member
Nov 3, 2007
939
1
66
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.
Thanks for the update & information
 

jfw

Registered
Nov 18, 2009
2
0
51
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.
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)
 
Last edited: