Skip to end of metadata
Go to start of metadata

Using VBScript you can schedule multiple backups or images and run them one after the other. This enables guaranteed execution sequence and additional functionality can be coded between backups and/or at the end of the sequence. 


To create a VBScript to run backups sequentially

  1. Step through the backup or image wizard and create the required XML backup definitions files.
     
  2. In the Backup Definition Files tab, right-click a backup definition file and choose Generate a VB Script File from the short-cut menu.

    The VBScript generation dialog box appears.


  3. Leave the options as defaults but change the file name for clarity.
     
  4. Select the VBScript Files tab, right-click the new file and select Edit from the short-cut menu.


    The VBScript file opens in the system default text editor, generally this is Notepad.

  5. For clarity, switch off word wrap. In notepad, choose Edit > Word Wrap.


  6. Find the line of code that starts the backup and copy and paste it once for each backup or image you want to run.
    The line looks like this:

    ExitCode = Backup ("""C:\Program Files\Macrium\Reflect\reflect.exe"" -e -w <BACKUP_TYPE> ""C:\Backups\backup1.xml"" -g")
  7. For each copy of the line change the xml file name to represent the backup you want to run. For example:

    ExitCode = Backup ("""C:\Program Files\Macrium\Reflect\reflect.exe"" -e -w <BACKUP_TYPE> ""C:\Backups\backup1.xml"" -g")
    ExitCode = Backup ("""C:\Program Files\Macrium\Reflect\reflect.exe"" -e -w <BACKUP_TYPE> ""C:\Backups\backup2.xml"" -g")
    ExitCode = Backup ("""C:\Program Files\Macrium\Reflect\reflect.exe"" -e -w <BACKUP_TYPE> ""C:\Backups\backup3.xml"" -g")
  8. Save the file.


 

Note: VBScript files must be scheduled independently. If you have any existing schedules for the XML backup definitions above then disable or delete them. To schedule VBScript source files, right click on the script and select 'Schedule.