backup-domain & restore-domain with certifications

1 post / 0 new
#1 Tue, 02/16/2016 - 19:37
edwardsmarkf

backup-domain & restore-domain with certifications

hello -

i am trying to use probably the most underrated and under-appreciated command in the history of CLI, the backup-domain and restore-domain commands.

we are attempting to just get an empty shell on a new server for testing. here are the commands i am issuing:

(old server)

virtualmin  backup-domain  --domain  marksDomain.com  --dest   /home/mark/marksDomain.tgz  --all-features   --except-feature  dir;

(new server)

virtualmin  restore-domain  --source /home/marksDomain.tgz   --all-virtualmin --all-features  --all-domains ;

this works great for a site that does not have a certification. for a site with a certification, i get the following message:

systemctl  restart  httpd ;

Job for httpd.service failed because the control process exited with error code. See "systemctl status httpd.service" and "journalctl -xe" for details.

systemctl status httpd.service  ;   httpd.service - The Apache HTTP Server
   Loaded: loaded (/usr/lib/systemd/system/httpd.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Tue 2016-02-16 20:29:57 EST; 8s ago
  Process: 12320 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)
  Process: 12098 ExecReload=/usr/sbin/httpd $OPTIONS -k graceful (code=exited, status=1/FAILURE)
  Process: 12319 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)
Main PID: 12319 (code=exited, status=1/FAILURE)
Feb 16 20:29:57 markserver.info systemd[1]: Starting The Apache HTTP Server...
Feb 16 20:29:57 markserver.info httpd[12319]: AH00526: Syntax error on line 437 of /etc/httpd/conf/httpd.conf:
Feb 16 20:29:57 markserver.info httpd[12319]: SSLCACertificateFile: file '/home/marksDomain.com/ssl.ca' does not exist or is empty
Feb 16 20:29:57 markserver.info systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE
Feb 16 20:29:57  markserver.info kill[12320]: kill: cannot find process ""
Feb 16 20:29:57 markserver.info systemd[1]: httpd.service: control process exited, code=exited status=1
Feb 16 20:29:57 markserver.info systemd[1]: Failed to start The Apache HTTP Server.
Feb 16 20:29:57 markserver.info systemd[1]: Unit httpd.service entered failed state.
Feb 16 20:29:57 markserver.info systemd[1]: httpd.service failed.

it appears that the "ssl.ca" is expected. the backup & restore option brought over the ssl.key & ssl.cert - was the ssl.ca key supposed to be copied over with the other two?

thank you all very much.

==================================================

UPDATE: when i manually copy ssl.ca from the old server to the new, things seem to work fine. why is backup-domain and restore-domain copying over ssl.key and ssl.cert but skips ssl.ca ?

the problem is that apache will not start up without this file in place. notice too the messages i receive from restore-domain dont seem to indicate anything is wrong:

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

Restoring Virtualmin settings ..
.. done

Re-creating virtual server comptonpeslonline.com ..
    Creating administration group comptonpeslonline.com ..
    .. done

    Creating administration user comptonpeslonline.com ..
    .. 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

    Creating SSL certificate and private key ..
    .. done

    Adding new SSL virtual website ..
    .. done

    Re-starting DNS server ..
    .. done

    Applying web server configuration ..
    .. not running!

    Saving server details ..
    .. done

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

    Updating administration password and quotas ..
    .. done

    Restoring Cron jobs ..
    .. done

    Re-creating records in DNS domain ..
    .. done

    Restoring Apache virtual host configuration ..
    .. done

    Checking restored PHP execution mode ..
    .. mode CGI wrapper OK for this system

    Updating home directory in PHP configuration ..
    .. done

    Restoring Apache log files ..
    .. done

    Restoring SSL Apache virtual host configuration and certificate ..
    .. done

    Re-creating mail and FTP users ..
    .. done

    Re-creating mail aliases ..
    .. done

    Restoring mail files ..
    .. done

    Restoring mail and FTP user Cron jobs ..
    .. done

Enabling PHP modules for restored scripts ..
.. no PHP modules needed to be installed

Re-starting DNS server ..
.. done

Applying web server configuration ..
.. not running!

Restore completed successfully.