restoring a backup with username already in the server

sharmaine001

Well-Known Member
Jun 23, 2006
143
0
166
I am transferring/untarring the backup to my VPS. However the username is already existing in the server. I tried to change the username of the domain in my VPS to something else using Modify Account in WHM. Then I unpackage the backup file. However after doing so, it messed it up. Although cpanel says its successful, when I checked WHM, the domain associated is the old domain where username has already been changed to something else. I tried running /scripts/updateuserdomains /scripts/rebuildcpusers but it didnt help. I even deleted the domain in the VPS so I can restore the backup but its still not right.

Any help?
 

thewebhosting

Well-Known Member
May 9, 2008
1,199
1
68
The backup file should be of the same username you are trying to restore otherwise it will not allow you to restore from WHM.

If possible please take the backup again with the same username and try again.
 

sharmaine001

Well-Known Member
Jun 23, 2006
143
0
166
The backup file should be of the same username you are trying to restore otherwise it will not allow you to restore from WHM.

If possible please take the backup again with the same username and try again.
thats not im asking. you dont understand what I said.

This is the example:

my VPS has already a user "user1" for another domain myuser.com

I am transferring a backup from other host with user "user1" also but different domain iamuser.com

cpanel wont allow me to restore the backup for iamuser.com because user1 already exists in my VPS

so what i did was i changed the username of myuser.com from user1 to user2. Then I restore the backup for iamuser.com

To my surprise, cpanel messed it up. Although the files for iamuser.com has been restored, it is using domain myuser.com

I checked /var/cpanel/users and there are now 2 users there - user1 and user2

when i opened user1 file, the domain associated is myuser.com instead of iamuser.com

I have tried terminating the account and the /var/cpanel/users do not get deleted. So i tried to manually delete user1 and user2 files from /var/cpanel/users

I restored the backup again for iamuser.com to my VPS but it is using domain myuser.com which is wrong!

This is a bug in cpanel!

This is my problem. Your post doesnt solve it.
 
Last edited:

madaboutlinux

Well-Known Member
Jan 24, 2005
1,051
2
168
Earth
This isn't a bug. The solution suggested to you on webhostingtalk.com is correct and works. It seems you tried various things during username change. You will now have to edit the corresponding files of each domain manually and have to correct the entries if something is wrong in there. You will mostly have to check the files under /var/cpanel/users/ directory.

If you are not sure, have someone look into the issue for you.
 

sharmaine001

Well-Known Member
Jun 23, 2006
143
0
166
This isn't a bug. The solution suggested to you on webhostingtalk.com is correct and works. It seems you tried various things during username change. You will now have to edit the corresponding files of each domain manually and have to correct the entries if something is wrong in there. You will mostly have to check the files under /var/cpanel/users/ directory.

If you are not sure, have someone look into the issue for you.
No i did not do various things before the username change. The instruction is pretty straightforward and thats what I did --

change the username in WHM
restore the backup

It is NOT working for 11.25. I don't know what version you are using but it surely did NOT work in 11.25 and messed up the domains. This is certainly a bug in cpanel
 

cPanelDon

cPanel Quality Assurance Analyst
Staff member
Nov 5, 2008
2,544
13
268
Houston, Texas, U.S.A.
cPanel Access Level
DataCenter Provider
Twitter
No i did not do various things before the username change. The instruction is pretty straightforward and thats what I did --

change the username in WHM
restore the backup

It is NOT working for 11.25. I don't know what version you are using but it surely did NOT work in 11.25 and messed up the domains. This is certainly a bug in cpanel
What is the full cPanel version number used during the steps performed; or, if the version has since been updated, please let us know the cPanel build tree that was configured and the approximate time frame involved.

For suspected bugs please submit a support request so that we may thoroughly investigate the situation and inspect the specific circumstances involved; by submitting a ticket this allows us to more efficiently investigate and troubleshoot the issue in addition to allowing for a speedier resolution. When available, please PM me referencing this forums thread and your new ticket ID number so I may follow-up internally.