script restore virtualmin domain

I would like to create a script that allows me to access the server 2 to server 1 take the backup made with virtualmin and restore the backup of a server on server 2 but I did not know if I can indicate the source via ssh I guess someone help?

virtualmin restore-domain --source ssh://root:password@ --all-domains --all-features

In your opinion is right? The server has an ip the server has 2 ip

Syntax looks okay, except for the fact that the keywords are denoted by two hyphens, like “--source”, “--all-domains” and “--all-features”.

sorry, had to copy and paste error.
The problem seems to connect the source ssh

Well, the syntax for the SSH looks okay. Can you elaborate? What exactly is the problem?

Missing or invalid restore file

Restores a Virtualmin backup, for the domains and features specified
on the command line.

virtualmin restore-domain --source file
[–domain name] | [–all-domains]
[–feature name] | [–all-features]
[–except-feature name]
[–reuid | --no-reuid]
[–option feature name value]
[–all-virtualmin] | [–virtualmin config]
[–shared-ip address | --ip address | --allocate-ip]
[–only-missing | --only-existing]

Multiple domains may be specified with multiple --domain parameters.
Features must be specified using their short names, like web and dns.

The source can be one of :

Okay, I suppose then the SSH connection/retrieval does not work… Wrong username, password, IP, path or filename maybe? Connection problem?

everything is correct

Okay, sorry, no idea here then. Good luck anyway! :slight_smile: