Backup/Restore errors

I'm trying to migrate my domains from a Virtualmin on CentOs 6.8 (Webmin 1.821/Virtualmin 5.04) to CentOs 7 (Webmin 1.831/Virtualmin 5.05).

I'm following the virtualmin backup/restore precedure from cli: virtualmin restore-domain --source /mnt/backup/ --all-domains --all-features

I got some errors: some domains does not have the /etc/logrotate.d/$DOM.conf file, I don't know why. So, I created them by hand, copying anoter one and correcting name and content, but the errors persists.

I did a new copy of backup with --continue-on-error.

On the restore side, I did not find all logrotate files I expect, also the correctly backupped ones. The .tar.gz contains it (./.backup/$DOM_logrotate), but seems that they are not restored. Just few of them, I cannot undestand which one yes and which no...

But I can copy it by hand

Instead, I got errors in apache config and ssl certificates:

Applying web server configuration .. .. failed! An Apache configuration error was detected : (2)No such file or directory: AH02297: Cannot access directory '/var/log/virtualmin/' for log file '/var/log/virtualmin/febaf.it_access_log' defined at /etc/httpd/conf/httpd.conf:367

AH00014: Configuration check failed

Applying web server configuration .. .. failed! An Apache configuration error was detected : AH00526: Syntax error on line 733 of /etc/httpd/conf/httpd.conf:

SSLCACertificateFile: file '/home/ossif/ssl.ca' does not exist or is empty

And the .conf file seems to have not "imported" the failing lines, but both the folder and the files exists.

I'm wrong somewhere?

Thanks a lot!

Status: 
Active

Comments

Howdy -- thanks for contacting us!

Let's start with that first error... you're saying that /var/log/virtualmin/ does exist?

Perhaps there's a permissions issue of some sort then.

What is the output of this command:

ls -la /var/log/virtualmin/

[root@vsp01 ~]# ls -la /var/log/virtualmin/
total 32
drwx--x--x.  2 root          root   4096 Feb 26 03:36 .
drwxr-xr-x. 13 root          root   4096 Feb 28 03:38 ..
-rw-r--r--.  1 root          root      0 Feb 23 16:11 abics.it_access_log
-rw-r--r--.  1 root          root      0 Feb 23 16:06 abiformazione.it_access_log
-rw-rw----.  1 abi           apache    0 Feb 26 03:36 abi.it_access_log
-rw-rw----.  1 abi           apache 2997 Feb 23 14:36 abi.it_access_log-20170226.gz
-rw-rw----.  1 abi           apache    0 Feb 26 03:36 abi.it_error_log
-rw-rw----.  1 abi           apache   20 Feb 23 16:09 abi.it_error_log-20170226.gz
-rw-r--r--.  1 root          root      0 Feb 23 16:12 abilearning.it_access_log
-rw-r--r--.  1 root          root      0 Feb 23 16:10 apb.it_access_log
-rw-r--r--.  1 root          root      0 Feb 23 16:21 canali.abilearning.it_access_log
-rw-rw----.  1 comunicazione apache    0 Feb 26 03:36 comunicazione.bancariaeditrice.it_access_log
-rw-rw----.  1 comunicazione apache 2211 Feb 23 15:24 comunicazione.bancariaeditrice.it_access_log-20170226.gz
-rw-rw----.  1 comunicazione apache    0 Feb 26 03:36 comunicazione.bancariaeditrice.it_error_log
-rw-rw----.  1 comunicazione apache   20 Feb 23 16:09 comunicazione.bancariaeditrice.it_error_log-20170226.gz
-rw-r--r--.  1 root          root      0 Feb 23 16:20 culturacreativa.it_access_log
-rw-r--r--.  1 root          root      0 Feb 23 16:16 dev.abiformazione.it_access_log
-rw-r--r--.  1 root          root      0 Feb 23 16:06 ossif.it_access_log
-rw-r--r--.  1 root          root      0 Feb 23 16:20 scuderiedipalazzoaltieri.it_access_log
-rw-r--r--.  1 root          root      0 Feb 23 16:11 seda.sepaitalia.eu_access_log
-rw-r--r--.  1 root          root      0 Feb 23 16:16 svil.abiformazione.it_access_log
-rw-r--r--.  1 root          root      0 Feb 23 16:15 vsp01.abi.it_access_log
-rw-r--r--.  1 root          root      0 Feb 23 16:11 www2.conciliatorebancario.it_access_log
-rw-r--r--.  1 root          root      0 Feb 23 16:12 www3.abi.it_access_log
-rw-rw----.  1 tfargentina   apache    0 Feb 26 03:36 wwww.tfargentina.it_access_log
-rw-rw----.  1 tfargentina   apache   20 Feb 23 16:06 wwww.tfargentina.it_access_log-20170226.gz
-rw-rw----.  1 tfargentina   apache    0 Feb 26 03:36 wwww.tfargentina.it_error_log
-rw-rw----.  1 tfargentina   apache   20 Feb 23 16:06 wwww.tfargentina.it_error_log-20170226.gz
[root@vsp01 ~]#

Hmm, we may want to try to make a few permissions tweaks to see if that helps.

Try running these commands:

chmod 660 /var/log/virtualmin/*
chgrp apache /var/log/virtualmin/*
service httpd restart

Does that resolve the error about not being able to access /var/log/virtualmin?

I did some other tests. After faild restore (I let the VM in its state, not going back to previous snapshot), I added one of the failing lines in httpd.conf:

CustomLog /var/log/virtualmin/mediakit.bancaforte.it_access_log combined

Doing a httpd -t it does not report errors. Then service httpd restart: /var/log/messages, /var/log/httpd/error_log, /var/log/httpd/access_log does not report errors.

Only news is the presence of a new file, as expected:

[root@vsp01 virtualmin]# ls -latr /var/log/virtualmin
total 32
-rw-rw----.  1 abi           apache 2997 Feb 23 14:36 abi.it_access_log-20170226.gz
[...omissis...]
-rw-rw----.  1 tfargentina   apache    0 Feb 26 03:36 wwww.tfargentina.it_access_log
drwxr-xr-x. 13 root          root   4096 Mar  1 03:46 ..
-rw-r--r--.  1 root          root      0 Mar  1 11:46 mediakit.bancaforte.it_access_log
drwx--x--x.  2 root          root   4096 Mar  1 11:46 .

Then I launched the chmod/chown hack.

Now I'm running the restore again, overwritting all.

I think there is some little problem in restore script: may be related to dots in file/folder names, or something like that? No, not dots, because at least one other domain is restored... uhm...

Ok, restore ended without the /var/log/virtualmin error. But the httpd.conf lack a lot of CustomLog settings... I think I'll recreate the new by diff/hand...

Also the certificate error's are gone: may be they are copyed too late, respect the apache test?

Now I'll try to do the restore again from the snapshot point (near a fresh install).

Now I found that the restore process does not import DB data....

It sounds like you're seeing a lot of issues with restores there!

Normally those work very smoothly. Sorry about all the trouble!

Are you by chance seeing any errors during the restore process? Actually, could you perhaps share the full output you receive while restoring a domain?

Sorry for the delay!

What is an example of a domain that should have had MySQL databases restored, but you found that there were no databases after the restore had completed?

Just as example, abiformazione, ossif, muvir (that contains 2 DB: muvir and muvir_wordpress), etc