The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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:
    3
    Trophy Points:
    38
    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?
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    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? ;)
     
  3. PWSowner

    PWSowner Well-Known Member

    Joined:
    Nov 10, 2001
    Messages:
    2,948
    Likes Received:
    3
    Trophy Points:
    38
    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.
     
Loading...

Share This Page