Restoring sub server only

Is it possible to Restore sub server only?
If so how do you do it?
I’ve tried everything; it seems it will restore the primary domain first (which would be a disaster) then it restores the sub servers.

I’m trying to create a demo site, it would have to be restored every hour or so on a schedule.


What backup format are you using?

If you choose the “One file per server” option, there should only be enough data in there to restore the Sub-Server, it shouldn’t be able to do anything to any other Virtual Servers.

I’m using “one file per server”.

I did notice that originally it didn’t backup the sub server; I assumed it was in the same file as the parent; I did check “Include sub-servers of those selected”; maybe I needed to re-save my scheduled backups; since it did back them up after I did this.

How can I schedule a restore?
I did read about command line and see that I can schedule CRON jobs; can I use it to schedule a restore every hour or is there a better way to do this.


Can someone give me an example of using the command line to automate a restore?

You would just use the script:,virtualmin_api_restore_domain/

You can setup a cron job to have it run once a day or whatever, and just have it do something like: --source /path/to/backup_file.tar.gz

The URL above has some options for restoring over a network too if you prefer.

Just to document what I did.
I created a CRON Job

Execute cron job as root
Active? Yes
Command /usr/libexec/webmin/virtual-server/ --source /path/to/mydomain.tar.gz --domain mydomain --all-features
Simple schedule Hourly

One thing I didn’t understand was the “Input to command” box; this is where I was trying to put the command line arguments; but it didn’t work.

In fact that was my whole problem; once I looked at other CRON jobs I notice it wasn’t being used and then I added them to the command and it worked fine.

Yeah, that is a little confusing.

Some scripts require input after starting – for example, the "passwd" command prompts for a password.

The "input to command" option allows you to send input to a program that prompts for it.