SOLVED Full restore (cpmove) doesn't restore subdomains

PeteS

Well-Known Member
Jun 8, 2017
194
36
28
Oregon
cPanel Access Level
Root Administrator
Hi,

Has anyone seen this issue. I assumed a quick Google would find something on it but I find nothing.

I'm transferring an account from one server to another using cpmove method. It completes with warnings for each subdomain. Here's a sanitized example from the log:

"Skipped item (“Domains::_fix_subdomain_docroot”, line 120): Failed to move the document root for “subdmain.example.com” to “/home/example/public_html/subdomain”: Directory not empty"

I checked the file structure and the subdomain subdirectories exist and are empty except for an empty CGI folder. Surely that's not the problem, that it creates the subdomain folder and the default CGI subfolder, and thus it is not empty, so fail?

I retried with Restricted Restore off, same result.

Centos 7.4, cPanel 68.0.19
 

PeteS

Well-Known Member
Jun 8, 2017
194
36
28
Oregon
cPanel Access Level
Root Administrator
Hmmm... Maybe I spoke too soon. The file structure appears to be correct, compared to the old server. (My initial analysis seems to have been premature "I checked the file structure and the subdomain subdirectories exist and are empty except for an empty CGI folder. Surely that's not the problem, that it creates the subdomain folder and the default CGI subfolder, and thus it is not empty, so fail?" This actually is correct, right?)

So why the warning?
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,203
363
Hello Pete,

Could you open a support ticket using the link in my signature so we can take a closer look?

Thank you.
 

PeteS

Well-Known Member
Jun 8, 2017
194
36
28
Oregon
cPanel Access Level
Root Administrator
Hello Pete,

Could you open a support ticket using the link in my signature so we can take a closer look?

Thank you.
Actually I just sorted it out...

The old server (no root access, so I have to guess on some of this) is set up as:
/home/user/subdomain (contains the content) with a symlink from /home/user/public_html/subdomain (with no content, but pointing to the content) and subdomain.example.com pointed to /home/user/public_html/subdomain. It wasn't this way in the past and I don't know when they changed things, but it's a bit odd (and part of the reason it's the "old" server - I'm leaving that sinking ship).

The new server is the normal /home/user/public_html/subdomain only, with subdomain.example.com pointed to /home/user/public_html/subdomain.

It looks like cpmove doesn't know what to do with that. All I had to do was move the content to the empty (thus 403) folder o the new server and all's well.

If that all sounds right to you then we're done and you can mark it solved. Someone else may run into this same issue and hopefully this will help.

-Pete
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,203
363
Hello Pete,

I'm glad to see you were able to determine the cause of the issue. I'm marking this thread as solved.

Thank you.