• 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

Backup manager not including httpdocs

Nick76

New Pleskian
Hello, we had to change the primary domain name because it included an extra www (so it was www.www.SITE.COM). The website works fine, no apache errors but /var/www/vhosts/SITE.COM has no httpdocs, which is served, as per apache documentroot in /var/www/vhosts/site.com/httpdocs/conf/httpd_ip_default.conf, from the old /var/www/vhosts/WWW_SITE.COM, which still exists and is also accessed when using ftp. It seems that Backup Manager does not follow this apache directive and because of that does NOT backup the httpdocs folder (a wordpress installation, by the way).
Any clue as to how can we solve this issue?

CentOS 7, Plesk Onyx 17.5.3 update 62
 
Last edited:
@Nick76,

From what you are writing, I can safely assume and state that backups are including the httpdocs directory, but that directory is simply empty in your setup.

In essence, the domain structure is a bit different due to the fact that you made some changes to that structure in the past.......and that affects the backup (slightly).

A simple solution would be consisting of

1 - just copy the entire site to /var/www/vhosts/site.com/httpdocs - you can use rsync and/or cp commands OR just the cloning utility in WordPress Toolkit
2 - make sure that the copied site is pointing to the right database - when using the WordPress Toolkit, this would be automatically set up properly with a database duplicate
3 - remove the offending entries in the "Apache documentroot" (as you call it)
4 - make sure that DNS is not pointing to the old site

and, in addition, you should do some simple tweaking (if required): for instance, have a look at the default URL of the WP instance and make sure that it is correct.

The above is intended to give you some inspiration, since it is rather impossible to provide an exact solution with the information you provided.

However, I am pretty sure that the above can be sufficient to allow you to change the (erroneous) changes that you made to the site structure in the past.

Hope the above helps a bit!

Kind regards......
 
Hello! Thank you for your answer. Indeed the /var/www/vhosts/site.com/httpdocs is empty (it does not even exists), whereas /var/www/vhosts/www.site.com/httpdocs is serving the content. Problem is, the httpd_ip_default.conf file (the Apache conf for the main site in /var/www/vhosts/system/site.com/conf/) is automatically generated, it even says do not modify because it gest automatically created, and because of that I have no clue as to where to make the path adjustment.

Also, since all I did was changing the domain name, not adding a new one, I can't copy anything from Plesk GUI because it only sees one domain (the site.com one). I can probably only do it via ssh. Wordpress toolkit only offers th possibility of copying to a subdomain (which would probably still end up under the old /var/www/vhosts/www.site.com/httpdocs folder).

Also, I'm noticing something weirder.

/var/www/vhosts/www.site.com/ contains the site structure (httpdocs...)
/var/www/vhosts/system/www.site.com/ contains the site configuration folders (conf...)

/var/www/vhosts/site.com/ contains the same folders and content found in /var/www/vhosts/system/site.com/ (conf...) so I have in these two a duplicate of the new site conf but no site structure.
 
Last edited:
@Nick76

First of all, you can always send me a private message via the forum, also in Dutch (if I am not mistaken, that is your native language).

In essence, you should be able to create a new domain with the name site.com, at least that is my personal guess given the information provided by you: the name of the directory /var/www/vhosts/www.site.com/httpdocs is suggesting that you created a domain/subscription in the form of www.site.com (which is old skool, that would not be possible anymore in the latest versions of Plesk).

Nevertheless, you can still copy files to the new site directory, being /var/www/vhosts/site.com/httpdocs.

That way, your backups would at least contain the proper files related to site.com.

In general, SSH access would be very helpful..............do you have any?

Regards......
 
Hi again. Yes I have root ssh access. No I do not speak Dutch XD I'm Italian.
Let me clarify: in plesk gui (hosting settings > domain name) I have this domain (the main and only one): site.com
This was previously www.site.com, resulting in a double www.www (as plesk already adds the trailing www)
Upon name changing, a new site.com folder, empty, was created under /var/www/vhosts/
Now in /var/www/vhosts/ both site.com and www.site.com exist.
Under /var/www/vhosts/system both site.com and www.site.com exist.
/var/www/vhosts/site.com/ holds conf files instead of site structure. I don't know why. So it appears to be a duplicate of /var/www/vhosts/system/site.com/

/var/www/vhosts/www.site.com/ holds site content and is pointed to in /var/www/vhosts/system/site.com/conf/httpd_ip_default.conf under "DocumentRoot".
/var/www/vhosts/system/www.site.com/ still exists and holds the same content of /var/www/vhosts/system/site.com/ - the exact same conf files!

I really don't understand how changing the domain name would make this mess.

Changing the siteURL and Home in wp-config.php from https://www.site.com to https://site.com caused the following error page to show: "this site has redirected you too many times" (this was a google error page, not an error page from my site).

Also, since it might be unclear: the "site" in site.com and www.site.com is the exact same word. All was changed was the trailing www.
 
@trialotto
Update.
I think I have found the main inconsistency:

running:
plesk db
select dom_id,sys_user_id,www_root from hosting where dom_id=X;

returns the old www_root: /var/www/vhosts/www.site.com/httpdocs (which still exists) instead of the expected /var/www/vhosts/site.com/httpdocs (which was NOT created by plesk upon domain name change, so it does not exist)

running:
plesk db
select id,login,home from sys_users where id=X;

returns the old home: /var/www/vhosts/www.site.com (which still exists) instead of the expected /var/www/vhosts/site.com (which exists but does not contain the actual site content)

So:
1) What do I do to copy the content recursively from the old www_root to the new one: cp -pR /var/www/vhosts/www.site.com/httpdocs /var/www/vhosts/site.com/httpdocs ?
2) How do I fix the plesk db inconsistency?
3) After copying the website content and fixing the db, do I have to reconfigure the domain ( /usr/local/psa/admin/bin/httpdmng --reconfigure-domain site.com ) ?
4) WHY did this happen?
5) Any other db table/row I should look into (I am also using ftp, which appears to point to the old www_root)?

Thank you in advance!
 
Hello! Allow me to bump my previous message. I'm wondering if anybody faced the same issue upon main domain name change and if the steps I'm mentioning are correct and particularly risky...

@trialotto
Update.
I think I have found the main inconsistency:

running:
plesk db
select dom_id,sys_user_id,www_root from hosting where dom_id=X;

returns the old www_root: /var/www/vhosts/www.site.com/httpdocs (which still exists) instead of the expected /var/www/vhosts/site.com/httpdocs (which was NOT created by plesk upon domain name change, so it does not exist)

running:
plesk db
select id,login,home from sys_users where id=X;

returns the old home: /var/www/vhosts/www.site.com (which still exists) instead of the expected /var/www/vhosts/site.com (which exists but does not contain the actual site content)

So:
1) What do I do to copy the content recursively from the old www_root to the new one: cp -pR /var/www/vhosts/www.site.com/httpdocs /var/www/vhosts/site.com/httpdocs ?
2) How do I fix the plesk db inconsistency?
3) After copying the website content and fixing the db, do I have to reconfigure the domain ( /usr/local/psa/admin/bin/httpdmng --reconfigure-domain site.com ) ?
4) WHY did this happen?
5) Any other db table/row I should look into (I am also using ftp, which appears to point to the old www_root)?

Thank you in advance!
 
Back
Top