How to backup domains to remote server from command line?

I am trying to backup and restore domains from the command line from my production server to my staging server using SSH. I am having trouble with the syntax of --dest option. My servers are using non-standard port number and I haven’t figured out the correct syntax. So far I’ve tried:

virtualmin backup-domain --feature dir --feature mysql --domain --dest ssh://

virtualmin backup-domain --feature dir --feature mysql --domain --dest ssh://

virtualmin backup-domain --feature dir --feature mysql --domain --dest ‘scp -oPort=9999’

And many other permutations. Can anyone give me some guidance here? I use ssh and scp between these servers from the command line without any problem, though I do use the -oPort=9999 option to specify the non-standard port. I am setup for passwordless login using server keys and most often use scp and ssh without a password.

Any assistance will be greatly appreciated!


Well, when using the GUI, in the hostname field, you would list a non-standard port by specifying “hostname:port”.

You may want to try something like “”, or something similar.


No Joy… I tried that. I get this error message:

Failed to open /usr/libexec/webmin/virtual-server/ssh:// for writing : No such file or directory

Oh, and I tried it with the colon after the port, too… no luck.


–dest ssh://$USER:$PASS@$HOST:$PORT:$PATH

i.e. ssh://userCOLONpass@hostCOLONportCOLONpath

(just what andreychek said :slight_smile:

I believe user and pass (and path) are required.