Problem restoring a virtual server

Hello!
Because a problem restoring certain VS (existing mysql database and user) I deleted it from Virtualmin Panel and started a clean restore.
It seems like Awstats registry was not remove so I went to Webmin-Servers-Awstats and remove this VS
Started again and I get some copy errors I don’t understand how to solve them.
I am logged as root.

. configuration failed : Failed to copy /etc/php.ini to /home/blah/etc/php5/php.ini : cp: cannot create regular file `/home/blah/etc/php5/php.ini’: No such file or directory

… Webalizer reporting failed! : Failed to open /home/blah/public_html/stats/.htaccess.webmintmp.22753 : No such file or directory at …/web-lib-funcs.pl line 1331, line 1.

Adding DAV directives to website configuration …
… DAV Login failed! : virtualmin-dav::feature_setup failed : Failed to open /home/blah/etc/dav.digest.passwd : No such file or directory at …/web-lib-funcs.pl line 1331, line 1.

… AWstats reporting failed! : virtualmin-awstats::feature_setup failed : Failed to open /home/blah/cgi-bin/awstats.pl.webmintmp.22753 : No such file or directory at …/web-lib-funcs.pl line 1331, line 1.

Despite this errors it seems like the server is recreated but this stuff.
I am able to create new virtual servers but cannot restore because of this.
Thanks for any help

PS: I would like an option to continue restoring "mysql user exists … continue? "
PS2: I deleted this domain but not all features have been deleted: awstats.blah.conf has not

Any clue?

do you have found a solution ???

It is a random issue. Some restores go fine and other do not.
A main domain is good while a subdomain is not.
Last time I went into this problem I made some attempts, one of these did the job well.
I guess it was not to select “restore all” (in features and settings), just select needed items in “Only those selected below” .
I have another post with other related problems.
Sounds odd but you have tell Restore not to restore what you have not backed up.

I also have restoring a second time disabling Restore home dir and web pages and php_mod is switched to FCDId.

This is a ‘fanciful’ subdomain.
I guess I deleted ALL subdomain content and settings from Virtualmin. Main data (public_html), lots of GB are stored in a renamed dir.
n-try
Create a new subdomain

Creating home directory …
… done

Adding records to DNS zone ***.com …
… done

Adding new virtual website …
… done

Performing other Apache configuration …
… configuration failed : Failed to copy /etc/php.ini to /home//domains/.com/etc/php5/php.ini : cp: cannot create regular file `/home//domains/.com/etc/php5/php.ini’: No such file or directory

Setting up scheduled Webalizer reporting …
… Webalizer reporting failed! : Failed to open /home//domains/.com/public_html/stats/.htaccess.webmintmp.2853 : No such file or directory at …/web-lib-funcs.pl line 1331, line 1.

Setting up log file rotation …
… Log file rotation failed! : … the log file /var/log/virtualmin/***.com_access_log is already being rotated at …/web-lib-funcs.pl line 1331.

Re-starting DNS server …
… done

Applying web server configuration …
… done

Saving server details …
… done

Updating Webmin user …
… done

Re-loading Webmin …
… done

After that I tried to restore and of course I got same errors, so I unchecked "Apache webserver configuration " and restore went good.
Then I compared apache directives from old and new server. They were identical.

No home dir. I don’t know if it was created, or probably it was deleted by Restore.
I changed back renamed home dir to its real name.
Then changed owner’s name-group

Server Configuration - Website Options
PHP script execution mode set to desired option
And now, yes, php.ini error msg.
A little tricky.
Anyway it is possible to copy needed apache settings from other VS and to manually copy needed files. But, there is a reason to prefer to admin a server using a control panel.

Why it cannot be good when creating a new VS, I don’t know.

For unknown reason the owner and group settings of the directory /home/$user/domains/ was some numerical value. I changed the owner of the directory to the $user, and that fixed my problem.