transfer-domain: Backup to remote system failed


I'm trying to transfer virtual servers to a remote server. Some are failing with this message:

Backing up to destination system ..
Backup to remote system failed
.. transfer failed

Doesn't matter if I use the Web UI or the shell command virtualmin transfer-domain.

Being curious I tried to transfer one of the failed servers using virtualmin backup-domain, manually SCP and virtualmin restore-domain. That worked well.

How can I debug the virtualmin transfer-domain command? Are there any log files I can use to track down the cause of the problem?

Thanks a lot for any help, Bernhard



You could try a backup using the backup-domain API command, like so :

virtualmin backup-domain --domain --all-features --dest ssh://root:password@otherserver/tmp --newformat

and see if that works, out outputs a more useful error message.

Using virtualmin backup-domain --dest ssh://... it works without problems.

Some additional information:

virtualmin transfer-domain leaves this files in /tmp/virtualmin-transfer-5510/ at the destination server:

drwxr-xr-x  2 root root     4096 Apr  6 17:51 ./
drwxrwxrwt 10 root root     4096 Apr  6 17:52 ../
-rw-------  1 root root 14919023 Apr  6 17:51
-rw-r--r--  1 root root     6372 Apr  6 17:51
-rw-r--r--  1 root root      220 Apr  6 17:51
-rw-------  1 root root     3041 Apr  6 17:51
-rw-r--r--  1 root root     4409 Apr  6 17:51
-rw-r--r--  1 root root       98 Apr  6 17:51

virtualmin backup-domain creates this files:

-rw-------  1 root root 14917579 Apr  6 17:53
-rw-r--r--  1 root root     6372 Apr  6 17:53
-rw-r--r--  1 root root      220 Apr  6 17:53

OS by the way is Debian 5.0.

Does anything get logged to /var/log/messages , or /var/log/authlog on the remote system when you try the transfer? This may indicate why the remote backup phase of the transfer is failing..

Remote system is Ubuntu 14.04. /var/log/syslog isn't showing anything related. /var/log/messages does not exist. /var/log/auth.log does show Accepted publickey entries only.

When you are doing the transfer, are you entering a password for the remote root user, or relying on SSH public key authentication?

I tried both ways - both are failing. For me it looks like the transfer isn't failing but some process after it is.

Can you post the full output you get if you run virtualmin backup-domain to the same remote system?

Sure, here it is:

# virtualmin backup-domain --domain --all-features --dest ssh://root:********** --newformat
Starting backup..
Creating backup for virtual server ..
    Copying virtual server configuration ..
    .. done

    Backing up Cron jobs ..
    .. none defined.

    Saving mail aliases ..
    .. done

    Saving mail and FTP users ..
    .. done

    Backing up mail and FTP user Cron jobs ..
    .. none to backup

    Copying Apache virtual host configuration ..
    .. done

    Copying Logrotate configuration ..
    .. done

    Dumping MySQL database db1 ..
    .. done

    Dumping MySQL database db2 ..
    .. done

    Copying Procmail and SpamAssassin configuration files ..
    .. done

    Backing up Webmin ACL files ..
    .. done

    Creating backup of Mailman mailing lists ..
    .. no lists found

    Creating TAR file of home directory ..
    .. done

.. completed in 4 seconds

Uploading archive to SSH server ..
.. done

1 servers backed up successfully, 0 had errors.

Backup completed successfully. Final size was 14.23 MB

Using passwordless SSH it fails with:

Starting backup..
Cannot backup multiple domains to ssh://, as it is not a directory
Backup failed!

But using password or not seems not to be the problem here because using virtualmin transfer-domain the backup files will be transfered to the remote system properly.

That all looks OK, and I am unable to re-produce this failure on my test system :-(

Any chance I could login to your server to see what is going wrong here?

Yes, would be glad if you will have a look at it. Can you contact me by email to talk about your prefered way how to connect to the boxes? My email address is saved here (as you probably know):

Ok, I had a look at your system and I see the problem - I temporarily enabled full backup output when doing transfers, and found that it fails because the transfer includes all sub-servers and aliases as well. One of your aliases is missing the Apache logging directives from it's configuration, which due to a separate Webmin bug causes the backup to fail.

We will be releasing a fix for this soon, but until then the work-around is to fix the Apache config to put back the logging directives. You can see the problem domain by running transfer-domain again from the command line.

Thanks a lot! Adding the Apache directives CustomLog and ErrorLog to the alias domains Apache config files did the trick.

How did you enabled full backup output?

I had to edit some of the Virtualmin code on your system..