2009/12/29 04:51:05
joaquimsa

Migrating(moving) users between resellers

Hi,

We are using Hosting Controller for a few months now , and in general everything is running fine without any major problems.

One of these days one of our clients that as severall accounts(webdadmin's) asked us if it was possible to move to a reseller account and move all of his accounts inside . We also use HSPHERE so our first thought was , of course, this should be quick and transparent.  After a closer look , no it is not possible.

Even the option that exists(moving websites) is time consuming since we have to create a new user (with a different name) , new plans and make the client notify all his clients since the login name will chane. To the client this was not valid and also for us it seems strange not having this option.

So , in light of this i've decided to take a look at the database and check if it was possible to move a user between resellers without changing user info and domains associated.  So far, i think i did it without big problems and everything seems to work fine.
I will lay down the operations done and apreciate that if someone knows if this could bring problems in the future, or if any more operations/changes need to be done.

1 - Create the reseller
2 - Go to table tblusers , check the UserId for the new reseller created. Then go to the webdamin user you want to move and put in the OwnerID field  the new reseller UserId.
3 - Since HostingController saves domains and user folders under a separate folder for each reseller we need to move the complete user folder from the actual reseller folder to the new.  This should be done with xcopy to keep ACL settings of the folder  P.ex. (xcopy c:\web\oldreseller\user c:\web\newreseller\user /D /E /C /R /H /I /K /Y /O /X )
4 - Change IIS Folder - In IIS manager change the PhysicalPath of the site and all virtual directories to the new one. (Basically change the reseller user name in the path. Everything else should be the same)  . This also must be done to the logs path.
5 - Change FTP folder - In the FTP manager (IIS or other) change the ftp path to the new one.

After this operations done, that taked about 5 minutes (wich is much faster that migrating website)  everything is working apparently well. The webdadmin appears in the new reseller , the website works fine, ftp, etc.  The only glitch i saw was that the webdadmin moved appears associated to the plan of the old reseller. I went to the database and also changed this in table SoldPlans changin the PlanID to the id of one of the plans of the new reseller.

So basically at this time i'm using all options and messing a little to see if something break's because this operation, but as far as i see everything seems quite stable. If all other options are "connected" to the user there shouldnt appear significant problems.

i know that HostingController surely does not support this but it seems a quite clean operation . If anyone knows of other implications or problems that can appear, please share :)

PS: I'm not using billing so didnt check the impact of this in the billing system.


Thanks,
Joaquim







1 comment Leave a comment
HC Team

We are using Hosting Controller for a few months now , and in general everything is running fine without any major problems.
One of these days one of our clients that as severall accounts(webdadmin's) asked us if it was possible to move to a reseller account and move all of his accounts inside . We also use HSPHERE so our first thought was , of course, this should be quick and transparent.  After a closer look , no it is not possible.


We have put it in our to do list and will provide in any coming build.



Even the option that exists(moving websites) is time consuming since we have to create a new user (with a different name) , new plans and make the client notify all his clients since the login name will chane. To the client this was not valid and also for us it seems strange not having this option.



We have put it in our to do list and will provide in any coming build. At the moment its not possible and you have to do it somehow by manual changes in database and system level.



So , in light of this i've decided to take a look at the database and check if it was possible to move a user between resellers without changing user info and domains associated.  So far, i think i did it without big problems and everything seems to work fine.
I will lay down the operations done and apreciate that if someone knows if this could bring problems in the future, or if any more operations/changes need to be done.

1 - Create the reseller
2 - Go to table tblusers , check the UserId for the new reseller created. Then go to the webdamin user you want to move and put in the OwnerID field  the new reseller UserId.
3 - Since HostingController saves domains and user folders under a separate folder for each reseller we need to move the complete user folder from the actual reseller folder to the new.  This should be done with xcopy to keep ACL settings of the folder  P.ex. (xcopy c:\web\oldreseller\user c:\web\newreseller\user /D /E /C /R /H /I /K /Y /O /X )
4 - Change IIS Folder - In IIS manager change the PhysicalPath of the site and all virtual directories to the new one. (Basically change the reseller user name in the path. Everything else should be the same)  . This also must be done to the logs path.
5 - Change FTP folder - In the FTP manager (IIS or other) change the ftp path to the new one.

After this operations done, that taked about 5 minutes (wich is much faster that migrating website)  everything is working apparently well. The webdadmin appears in the new reseller , the website works fine, ftp, etc.  The only glitch i saw was that the webdadmin moved appears associated to the plan of the old reseller. I went to the database and also changed this in table SoldPlans changin the PlanID to the id of one of the plans of the new reseller.


Good work
 

Its easy to do it in 5 minutes but panel can’t do it in 5 minutes. Panel has to check all the things if they are locked or not. Also in case of something can’t be moved; the rollback is an important thing.




So basically at this time i'm using all options and messing a little to see if something break's because this operation, but as far as i see everything seems quite stable. If all other options are "connected" to the user there shouldnt appear significant problems.

I know that HostingController surely does not support this but it seems a quite clean operation . If anyone knows of other implications or problems that can appear, please share :)



No problem at all. Enjoy the solution




PS: I'm not using billing so didnt check the impact of this in the billing system.



No changes required in billing system. Everything is connected to UserID. You may have to change UserID.
2009/12/31 02:06:07

Comments are closed.