• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Question Custom Apache Virtual Hosts on CentOS 6 for Manage partition backup

Davide

New Pleskian
Hi at all

And really thank s so much for any help :) is really appreciate

Try to explain on the situation....

I manage a vps with centos 6.9, different isolated domains are configure properly apache + nginx.

Now for space need I took another hdd and mounted it on the partition /mnt/vdb/

So far all right. :)

Now to retrieve space from the first partition, I wanted to move some site hosted in /var/www/vhosts/site into a new folder in /mnt/vdb/website/httpdocs/site.

I tried in many ways to move the entire account, using the virtual template, I tried to modify them, but in the end I managed to run it 'just' overwritten, thanks to vhost.conf and vhost_ssl.conf

By pointing them documentroot to the /mnt/vdb/website/httpdocs folder, apache now takes the files from them, and I can free the space on the first partition.

Is this a valid solution? Is possible thing move directly an entire apache virtual site management under the new folder? I tried adding a custom template taken from the default, but I did not succeed.


P.S. Always for backup, shuffling every post around (great Igor;)) I saw that rightly there are those who recommend installing the partition directly into the folder that you need, so to expand it and fix the space problem.

Is it worth doing it? for example, to mount it under /var/qmail/mailnames?

P.S. if it is a good thing, what is the correct procedure to mount the partition without losing the data present in /var/qmail/mailnames?

Thanks really 1000 for every help guys.

Have ever a wonderful day

p.s. excuse my rough english
 
Have you tried to use transvhosts.pl Plesk utility? But note that location of ALL vhosts will be changed by this utility.

Code:
# plesk bin transvhosts.pl --help
You should specify destination directory.
Utility to transfer vhosts content from HTTPD_VHOSTS_D directory to new place.

Usage:
        --dest-dir   <path>  Destination path. Path to new vhosts directory.
                             Example: /path/to/new/vhosts.
                             If directory does not exist it will be created.

        --correct-scripts    Changes user scripts.
                             Old vhost path is replaced to new path in content of all files.
 
Hi Igor :)

Very thanks for your interesting :) i've seen your post with this script, i've downloaded and see the code, and i i think is very good for me, if only is applicable to move 1 site :).

For need for use i can't move all site and for this i've following lines of overwrite apache virtual host config.


What do you think of an idea to add partiton directly to the folder who have need Igor? :)

In this example, the folder full is common /var/qmail/mailnames and /var/www/vhosts, and i think if i add another partiton, and mount directly in this 2 point ( copying before the content in another folder, for recopy all when the partition is mount) can be a good idea? :)

Could there be contraindications in Plesk in doing this? Maybe break some permission or something writing?

Thanks a thousand Igor, I have been using Plesk for quite some time and practically everything I've read that over time has helped ... you wrote it! : D: D: D

Very thank you so much Man
 
What do you think of an idea to add partiton directly to the folder who have need Igor? :)

In this example, the folder full is common /var/qmail/mailnames and /var/www/vhosts, and i think if i add another partiton, and mount directly in this 2 point ( copying before the content in another folder, for recopy all when the partition is mount) can be a good idea? :)
Yes, I think it is a good idea, but note, that it is very important to preserve all original permissions there.
Thanks a thousand Igor, I have been using Plesk for quite some time and practically everything I've read that over time has helped ... you wrote it! : D: D: D
Thanks :)
 
Back
Top