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
...