These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for Restoring sub server only on the new forum.
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.
Thanks
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.
-Eric
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 restore-domain.pl 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.
Thanks
Jeffrey Scott Flesher
Medically Retired Gulf War Vet
Can someone give me an example of using the command line to automate a restore?
Jeffrey Scott Flesher
Medically Retired Gulf War Vet
You would just use the restore-domain.pl script:
http://www.virtualmin.com/documentation/id,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:
restore-domain.pl --source /path/to/backup_file.tar.gz
The URL above has some options for restoring over a network too if you prefer.
-Eric
Just to document what I did.
I created a CRON Job
Execute cron job as <b>root</b>
Active? <b>Yes</b>
Command <b>/usr/libexec/webmin/virtual-server/restore-domain.pl --source /path/to/mydomain.tar.gz --domain mydomain --all-features</b>
Simple schedule <b>Hourly</b>
Jeffrey Scott Flesher
Medically Retired Gulf War Vet
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.
Jeffrey Scott Flesher
Medically Retired Gulf War Vet
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.
-Eric