Cannot select backup type (full, inc, diff) in MS-DOS Batch File schedule


Author
Message
GaryZ
GaryZ
New Member
New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)
Group: Forum Members
Posts: 9, Visits: 58
In MS-DOS Batch File schedule Full type is always selected by Macrium Reflect when adding a schedule. There is no option in to select the type when scheduling, unlike the schedule in the backup definition file.

The only way to use the batch file with the various back types seems to require a switch within the batch file (-inc, -full, -diff). E.g. "C:\program files\macrium\reflect\reflectbin.exe" -e -w -inc ... "

How can I avoid creating three separate batch files for each switch (full, inc and diff)?




jphughan
jphughan
Macrium Evangelist
Macrium Evangelist (21K reputation)Macrium Evangelist (21K reputation)Macrium Evangelist (21K reputation)Macrium Evangelist (21K reputation)Macrium Evangelist (21K reputation)Macrium Evangelist (21K reputation)Macrium Evangelist (21K reputation)Macrium Evangelist (21K reputation)Macrium Evangelist (21K reputation)Macrium Evangelist (21K reputation)
Group: Forum Members
Posts: 14K, Visits: 82K
You could have the batch file prompt you and capture the user's response as a variable that would be used to determine the syntax of the call to Reflect, specifically the backup type parameter that gets included, but then the batch file can't run non-interactively anymore.  Or you could have Reflect generate a VBScript or PowerShell script file to run your backups instead, either of which allow you to set schedules for those different types of backups.  Macrium actually discourages the use of batch files anyway because they have a lot of limitations that don't apply to VBScript or PowerShell scripts.  Is there some reason you have to use a batch file?  If you need help translating something in your batch file to PowerShell, I may be able to help.

Edited 5 December 2019 10:14 PM by jphughan
GaryZ
GaryZ
New Member
New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)New Member (21 reputation)
Group: Forum Members
Posts: 9, Visits: 58
jphughan - 5 December 2019 10:12 PM
You could have the batch file prompt you and capture the user's response as a variable that would be used to determine the syntax of the call to Reflect, specifically the backup type parameter that gets included, but then the batch file can't run non-interactively anymore.  Or you could have Reflect generate a VBScript or PowerShell script file to run your backups instead, either of which allow you to set schedules for those different types of backups.  Macrium actually discourages the use of batch files anyway because they have a lot of limitations that don't apply to VBScript or PowerShell scripts.  Is there some reason you have to use a batch file?  If you need help translating something in your batch file to PowerShell, I may be able to help.

Following your answer I tried the generated VBScript, that works out much better for me. Now I can select the backup type when scheduling VBScript. Thanks.

Another advantage using VBScript is a RoboCopy call is included in the generated VBScript file. (I'm going to add a /log and UNC paths to the RoboCopy call.) Previously I was using my old batch RoboCopy scripts to call RoboCopy, which I didn't want to rewrite, and now I don't need to..
Edited 6 December 2019 2:09 PM by GaryZ
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Login

Explore
Messages
Mentions
Search