Move domain to seperate user

Icheb

Verified User
Joined
Sep 15, 2003
Messages
556
Location
The Netherlands
I've got a 'storage' user with about 40 domains sitting on it, but now a new customer wants to use one of those domains. I already placed some content for him on it (testing period), but now he want's to keep it, and I need to push this domain into a new user.
Can that be done without deleting the domain/content first in some way ?

Thanks in advance
 
I do not think its possible to do this without. Sound like it could be a pretty good feature request although I don't know how practical it would be. It will probably end up becomming a 3rd party script or plugin.
 
I'm sure it would be fairly easy, but it would have to be done manually using shell commands.

I don't have the time to look into it now; perhaps someone else can look into it.

Jeff
 
Did it by doing something like this:
(all the following was done with the root account ;))
cd /home/<olduser>/domains/
cp -Rf <domain> tempdomain.com

Suspend the domain.

Dumped all db's with phpmyadmin, which isn't really needed if you're not deleting the entire user.

Delete the domain from user.

Create a user with the same domain.

cd /home/<olduser>/domains/tempdomain.com
cp -Rfv ./public_html/* /home/<newuser>/public_html/
chown -Rf newuser:newuser /home/<newuser>/public_html/*

After that, I suspended the new account,I created the databases in the new account, imported the dumps, edited the config.php's everywhere and unsuspended the account.

Note that this is not copypasted from what I actually did, so don't know if it's complete this way ;).

It did gave some problems with the chown, due to the fact a certain directory needed to be owned by apache:apache, but for the rest the content was moved without any problems.
Although a tool for this might be working better, as it totally took me about 30 min (including doing a backup of everything on backup server).


There should be an easier way of doing this :D...
 
Back
Top