Need advice on Automated Amazon EC2-based backup server with autmated synchronisation

I am designing a Amazon EC2 based automated recovery server procedure.

The method is as follows:

A virtualmin backup server is built in Amazon EC2, which by default is stopped (to avoid uneccesary costs).
At night, the production server does an incremental backup to a common location (S3 of SFTP).
To keep the backup server in sync, the following procedure would be ideal:

After backup is completed on the production server, a script is initiated. This script does the following:

  1. start backupserver on EC2
  2. do a recovery of the backup just done by the other server
  3. after complete recovery shutdown the backupserver

Thus, the backupserver will always be up to date. There has to be extra scripting for the full backup offcourse.

My questions:

a) Is it possible to script the recovery of a specified backup?
b) is it possible to execute commands after recovery?

Then I need all the info to create the scripts.


You can do that using the Virtualmin commands line tools.

If you run the command “virtualmin restore-domain”, you’ll see all the options available to you.

If you put that in a script, you can then include additional commands after the backup in question is restored.