Moving sites between /home2 and /home

JustSomeGuy

Active Member
Oct 13, 2007
31
0
56
Is there a way to move sites between partitions WITHOUT having the symlink left there?
I have a second hard drive that I wanted to have for backup only but it was mounted as /home2 and not about 1/3 of my sites are on it. I wanted to move them back to /home but don't want the symlink left in /home2 as I would like to mount the second drive as /backup
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
Hello :)

You can move accounts between your home partitions via:

"WHM Home » Account Functions » Rearrange an Account"

After an account is moved back to the /home partition, you can manually remove any symbolic links in the /home2 directory.

Thank you.
 

JustSomeGuy

Active Member
Oct 13, 2007
31
0
56
Thank you Michael for the update. Yes I have tried that with one site and it seems to work great.
Do you know if there is something that can be run on the command line to rearrange all accounts on /home2 to /home ???
As I have around 200 sites on /home2 I need to move over
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
Thank you Michael for the update. Yes I have tried that with one site and it seems to work great.
Do you know if there is something that can be run on the command line to rearrange all accounts on /home2 to /home ???
As I have around 200 sites on /home2 I need to move over
There are no automated tools or API functions available to rearrange multiple accounts at the same time. I recommend opening a feature request for this via:

Submit A Feature Request

Thank you.
 

JustSomeGuy

Active Member
Oct 13, 2007
31
0
56
Can you change it via the command line? If so, a simple script could be run to go through and move them. I just need the command line command to change a user
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,261
463
Can you change it via the command line? If so, a simple script could be run to go through and move them. I just need the command line command to change a user
No, there are no command line tools or utilities that are equivalent to this feature in WHM. One alternative is to modify the default home directory for new accounts in "WHM Home » Server Configuration » Basic cPanel & WHM Setup". Then, backup, terminate, and restore the account.

Thank you.