1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Move vhosts and keep links

Discussion in 'Plesk 10.x for Linux Issues, Fixes, How-To' started by RossProactive, Dec 16, 2012.

  1. RossProactive

    RossProactive New Pleskian

    10
    85%
    Joined:
    Dec 16, 2012
    Messages:
    10
    Likes Received:
    0
    Hi all - I have a Plesk 10.3 server running on CentOS 6.

    I am running out of space on the current drive, and have installed a new disk to hold my vhosts folder.

    I need to run the transvhosts.pl script to move the vhosts folder; so:

    1 Can someone please advise what the command should be?
    2 Does it matter what I mount the new drive as?
    3 And most importantly, will this process mean the paths to /var/www/vhosts/mysite are still valid? I have lots of scripts which refer to files by the full path, so if the path changes, they will all require a rewrite.

    Many thanks experts

    Ross
     
  2. RossProactive

    RossProactive New Pleskian

    10
    85%
    Joined:
    Dec 16, 2012
    Messages:
    10
    Likes Received:
    0
    Thinking about ( I am not the world's greatest Linux brain) do I actually need to run the Plesk command at all? Can't I just mount the new drive as /var/www/vhosts somehow, and move files over?
     
  3. IgorG

    IgorG Forums Analyst Staff Member

    49
    24%
    Joined:
    Oct 27, 2009
    Messages:
    24,557
    Likes Received:
    1,241
    Location:
    Novosibirsk, Russia
    Have you tried to read carefully output of this command with --help option?
     
  4. RossProactive

    RossProactive New Pleskian

    10
    85%
    Joined:
    Dec 16, 2012
    Messages:
    10
    Likes Received:
    0
    Yes I did, but it does not answer all my questions. That's why I came here.
     
  5. Sergey L

    Sergey L Golden Pleskian Staff Member

    32
    43%
    Joined:
    Aug 10, 2006
    Messages:
    1,195
    Likes Received:
    30
    Yes, you definitely can. Just be sure ownership/permissions are preserved.
     
  6. RossProactive

    RossProactive New Pleskian

    10
    85%
    Joined:
    Dec 16, 2012
    Messages:
    10
    Likes Received:
    0
    Thanks Sergey, I think this is more of a Linux issue rather than a Plesk issue, but would this be the process:

    Format the new partition
    Stop apache
    Rename var/www/vhosts to vhosts_old
    Create var/www/vhosts and mount /dev/sd1a to this point
    Rsync data from var/www/vhosts_old to var/www/vhosts
    Start apache

    Am I on the right track?

    Thanks for your help.
     
  7. Sergey L

    Sergey L Golden Pleskian Staff Member

    32
    43%
    Joined:
    Aug 10, 2006
    Messages:
    1,195
    Likes Received:
    30
    Yes, I think that's right approach. If there are other people accessing Plesk, I would also stop Plesk to prevent any changes while moving data.

    /etc/init.d/psa stop
     
  8. RossProactive

    RossProactive New Pleskian

    10
    85%
    Joined:
    Dec 16, 2012
    Messages:
    10
    Likes Received:
    0
    Thanks so much!
     
Loading...