Restore not working

Think this may be a bug as I have carried out a clean install of the OS (CentOS 7.5) and Virtualmin (with no errors reported) and unfortunately I am still experiencing the same issue. Both servers are pretty much identical, so I am unsure what is going on.

I've been unable to restore either via the virtualmin login webpage, or via command line with the following command virtualmin restore-domain --source /home/backups-for-restore/mysite.com.tar.gz --all-features (which reports: No domains to restore specified)

Looking on GH it seems the command line tool throws that error when there is no --source parameter (https://github.com/virtualmin/virtualmin-gpl/blob/master/restore-domain....) but it's there.

Is this a bug perhaps? Or am I doing something wrong?

Status: 
Active

Comments

Looks like I was missing this --domain mydomain.com. The web interface is still not working though so I'll leave this open.

What goes wrong with the web interface exactly?

Did you get any error messages in /var/webmin/miniserv.error when you tried to restore?

How large is the backup file being restored out of curiosity?

JamieCameron - the only thing of note was a timeout message:

[12/Aug/2018:03:03:14 +0100] [my.ip] /virtual-server/restore.cgi : Timeout : Waited more than 60 seconds for request data Use of uninitialized

There are however lots of these:

Use of uninitialized value $settings{"settings_sysinfo_real_time_statu"...} in string eq at /usr/libexec/webmin/authentic-theme/stats.cgi line 25.

And these:

[12/Aug/2018:13:35:25 +0100] [my.ip.add] /csfimages/csf_small.png : File not found

Andreychek - it was 43mb, another I tried was 35mb - both had failed, but both worked successfully via the command line.

I have used the webUI for restores on older servers and they have always worked well (and fast).. so not sure what is causing this to hang tbh.

Those "Timeout : Waited more than 60 seconds for request data" errors look suspicious. Are you accessing your virtualmin server directly, or via some kind of proxy ?

Directly - the only thing I've changed is the port.

(Things like running a cron via the web UI seem fine too.)

Ok .. and which browser are you using?

Safari Version 11.1.1 (13605.2.8) on MacOS.

Btw, I'm not sure if it's related, but I have encountered one failure on restoring via command line - I'm not too bothered by this one as I don't mind decommissioning this particular site, but here's the results if it's any interest to you:

Checking for missing features ..
.. all features in backup are supported

Checking for errors in backup ..
.. no errors found

Starting restore..
Extracting backup archive file ..
.. done

Re-creating virtual server directory.mysite.com ..
    Creating administration group mysitedirectory ..
    .. done

    Creating administration user mysitedirectory ..
    .. done

    Creating aliases for administration user ..
    .. done

    Adding administration user to groups ..
    .. done

    Creating home directory ..
    .. done

    Creating mailbox for administration user ..
    .. done

    Adding new DNS zone ..
    .. done

    Adding new virtual website ..
    .. done

    Adding webserver user apache to server's group ..
    .. done

    Performing other Apache configuration ..
    .. done

    Setting up log file rotation ..
    .. done

    Creating PostgreSQL login ..
    .. done

    Creating PostgreSQL database mysitedirectory ..
    .. done

    Re-starting DNS server ..
    .. done

    Applying web server configuration ..
    .. done

    Saving server details ..
    .. done

Restoring backup for virtual server directory.mysite.com ..
    Restoring virtual server password, quota and other details ..
    .. done

    Updating administration password and quotas ..
    .. done

    Restoring Cron jobs ..
    .. done

    Extracting TAR file of home directory ..
    .. TAR failed! /bin/tar: ./apps/mysitedirectory/current: Cannot open: File exists
/bin/tar: Exiting with failure status due to previous errors

The reason the sub domain is called 'directory' is because the site is a Directory (that lists things). Just in case you were wondering, haha!

(PS, I'm not sure if Markdown code blocks are working properly here, I usually do ```text for text blocks and they usually display correctly on other forums which use Markdown)

Oh dear, the same error has happened on another restore - unfortunately this time I cannot discard this site.

    Extracting TAR file of home directory ..
    .. TAR failed! /bin/tar: ./apps/mysite/current: Cannot open: File exists
/bin/tar: Exiting with failure status due to previous errors

Any ideas what might be causing this?

Here are the last few lines from the logs (doesn't seem relevant, but just in case....)

Use of uninitialized value $settings{"settings_sysinfo_real_time_statu"...} in string eq at /usr/libexec/webmin/authentic-theme/stats.cgi line 25.
Use of uninitialized value $settings{"settings_sysinfo_real_time_statu"...} in string eq at /usr/libexec/webmin/authentic-theme/stats.cgi line 25.
restarting miniserv
[12/Aug/2018:23:10:05 +0100] Restarting
Pre-loaded virtual-server/virtual-server-lib-funcs.pl in virtual_server
Pre-loaded virtual-server/feature-unix.pl in virtual_server
Pre-loaded virtual-server/feature-dir.pl in virtual_server
Pre-loaded virtual-server/feature-dns.pl in virtual_server
Pre-loaded virtual-server/feature-mail.pl in virtual_server
Pre-loaded virtual-server/feature-web.pl in virtual_server
Pre-loaded virtual-server/feature-webalizer.pl in virtual_server
Pre-loaded virtual-server/feature-ssl.pl in virtual_server
Pre-loaded virtual-server/feature-logrotate.pl in virtual_server
Pre-loaded virtual-server/feature-mysql.pl in virtual_server
Pre-loaded virtual-server/feature-postgres.pl in virtual_server
Pre-loaded virtual-server/feature-ftp.pl in virtual_server
Pre-loaded virtual-server/feature-spam.pl in virtual_server
Pre-loaded virtual-server/feature-virus.pl in virtual_server
Pre-loaded virtual-server/feature-webmin.pl in virtual_server
Pre-loaded virtual-server/feature-virt.pl in virtual_server
Pre-loaded virtual-server/feature-virt6.pl in virtual_server
[12/Aug/2018:23:10:05 +0100] miniserv.pl started
[12/Aug/2018:23:10:05 +0100] IPv6 support enabled
[12/Aug/2018:23:10:05 +0100] Using MD5 module Digest::MD5
[12/Aug/2018:23:10:05 +0100] Using SHA512 module Crypt::SHA
[12/Aug/2018:23:10:05 +0100] Perl module Authen::PAM needed for PAM is not installed : Can't locate Authen/PAM.pm in @INC (@INC contains: /usr/libexec/webmin /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at (eval 18) line 1.
BEGIN failed--compilation aborted at (eval 18) line 1.

Failed to initialize SSL connection
Failed to initialize SSL connection

Just a quick note to add that both of these sites are Ruby on Rails sites - and from what I remember, the instructions to install mod_ruby (i.e. Passenger Fusion) has changed to the following:

=================       
INSTALL PASSENGER
=================

    sudo yum install -y epel-release yum-utils
    $ sudo yum-config-manager --enable epel
    $ sudo yum clean all && sudo yum update -y

    sudo yum update -y

    sudo yum install -y pygpgme curl

    # Add our el7 YUM repository
    sudo curl --fail -sSLo /etc/yum.repos.d/passenger.repo https://oss-binaries.phusionpassenger.com/yum/definitions/el-passenger.repo

    # Install Passenger + Apache module
    sudo yum install -y mod_passenger || sudo yum-config-manager --enable cr && sudo yum install -y mod_passenger

    sudo systemctl restart httpd

Could this be triggering those errors...

In my Ruby apps my directory structures are like this:

/home/name-of-app/apps/name-of-app/current/public

so name-of-app is repeated - could that be why the error is saying:

Extracting TAR file of home directory .. .. TAR failed! /bin/tar: ./apps/mysite/current: Cannot open: File exists /bin/tar: Exiting with failure status due to previous errors

:/

Yep that was it!!!!

I changed the directory name, so the path is now:

/home/name-of-app/apps/app1/current/public

And the restore worked without errors :D

(Just as a note though, this wasn't an issue last time I carried out a restore - probably over a year ago now tho).