Back up to Alternating Locations |
In a typical backup rotation scenario you may have two (or more) external USB drives that are rotated on a weekly basis. You would store the external drive that is not currently in use off-site for extra security.
This example uses two external USB drives that when connected to your PC, appear as drive E: and drive F:. Your images of drive C: are saved to E:\Images and F:\Images and Macrium Reflect saves your image files to whichever drive is currently connected to your PC.
Create two XML backup definitions as follows:
Image to E.xml – saves the image of drive C to E:\Images
Image to F.xml – saves the image of drive C to F:\Images
Right-click Image to E.xml and select Generate
a VBScript file.
and click OK.
Accept the defaults and click OK.
In the VBScript Files tab, right-click VBScript
file and select Edit.
The VBScript file opens in the system default text editor, generally
this is Notepad.
For clarity, switch off word wrap. In notepad,
choose Edit > Word
Wrap.
Edit the file in notepad as follows:
Replace the line:
ExitCode = Backup ("""C:\Program Files\Macrium\Reflect\reflect.exe""
-e -w <BACKUP_TYPE> ""c:\users\nick\documents\reflect\Image
to E.xml""")
With the following lines:
If DoesDirExist("E:\") = true Then
ExitCode = Backup ("""C:\Program Files\Macrium\Reflect\reflect.exe""
-e -w ""c:\users\nick\documents\reflect\Image to E.xml""")
Else
ExitCode = Backup ("""C:\Program Files\Macrium\Reflect\reflect.exe""
-e -w ""c:\users\nick\documents\reflect\Image to F.xml""")
End If
Note: Replace XML path and file names with the correct names for your scenario. |
At the end of the VBScript source paste the following lines:
Function DoesDirExist(byVal pathname)
Dim objFSO
Set objFSO = CreateObject("Scripting.FileSystemObject")
DoesDirExist = objFSO.FolderExists(pathname)
Set objFSO = Nothing
End Function
Save the file.
Execute or schedule the VBScript source file in exactly the same way as a backup definition file . See Schedule backups