Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Any problems with moving a sites directory and linking to it?

Discussion in 'General Discussion' started by PWSowner, Sep 4, 2004.

  1. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    4
    Trophy Points:
    343
    Location:
    ON, Canada
    I have a second hard drive, and rather than use a home2 partition for WHM to automatically use, I have all accounts created in /home and move specific ones to the other drive, then symlink to them.

    I create domainx.com at /home/usernamx, then I move the usernamx directory to a directory on the 2nd drive, /mysites/domainx.com, then symlink the new location to where it is expected to be. ln -s /mysites/domainx.com /home/usernamx

    The sites directory appears to be at /home/usernamx, but is physically located on a different drive, and in a directory easily recognizable.

    I did this a couple months ago with a test site and appears to have no problems. The site works. Email accounts work. Scripts that require the full path work using /home/usernamx/public_html/path/to/script. Testing shows that nothing appears to be affected by the symbolic link, so I'm going to move a few of my sites to the 2nd drive this way.

    Question is:
    Are there any problems with moving a sites directory and linking to it that I may not have found yet?

    Another way to word it is:
    Is there any function that can be affected by the directory not physically being where it's supposed to be?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,460
    Likes Received:
    21
    Trophy Points:
    463
    Location:
    Go on, have a guess
    The only thing I can think of is cPanel backups - do they backup the symlinked directory or just the symlink file? ;)
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    4
    Trophy Points:
    343
    Location:
    ON, Canada
    Backup doesn't follow symbolic links, but that isn't a possible problem because I use my own backup script. That's one of the reasons I'm doing this. ;)

    My script backs up the home directory daily, and will be backing up my other directory weekly, but the mail folders in it will be hourly.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice