MS-DOS batch file invocation - command line switches and scheduling


Author
Message
Richard V.
Richard V.
Most Valuable Professional
Most Valuable Professional (4.1K reputation)Most Valuable Professional (4.1K reputation)Most Valuable Professional (4.1K reputation)Most Valuable Professional (4.1K reputation)Most Valuable Professional (4.1K reputation)Most Valuable Professional (4.1K reputation)Most Valuable Professional (4.1K reputation)Most Valuable Professional (4.1K reputation)Most Valuable Professional (4.1K reputation)
Group: Forum Members
Posts: 2K, Visits: 8K
=Bill R --- I think my ideal solution would be a return code from reflect.exe to indicate when one of the backup types is suppressed for the above reason.

There may be a list of return codes posted somewhere, but I've not seen one.  There was an answer (from Nick, if I recall correctly) to another forum question saying that both cancelled backups and xml validation errors return exit code '1', but I recall seeing no other return code specifics.  I think you're going to need some input directly from Macrium, either here or via a support ticket, on that question.

Regards, Richard V. ("Arvy")
https://forum.macrium.com/uploads/images/afc5d4fe-5d25-4e25-be94-185e.png

Edited 18 January 2016 6:27 PM by Arvy
Drac144
Drac144
Expert
Expert (737 reputation)Expert (737 reputation)Expert (737 reputation)Expert (737 reputation)Expert (737 reputation)Expert (737 reputation)Expert (737 reputation)Expert (737 reputation)Expert (737 reputation)
Group: Forum Members
Posts: 468, Visits: 1.8K
The following is MY understanding of how Reflect works.

If 3 tasks are scheduled to run at the same time, whichever task the scheduler runs first will be executed.  The other two will be sent to Reflect but not executed until the first task completes.  Reflect does NOT look at all 3 and decide which one to execute first.  If you want then done in a specific order, schedule them a minute apart in the order YOU want.

You can set the task scheduler to only execute a task on certain days so you can skip doing an incremental (and/or) differential on the day you run a full backup.  It makes no sense to run an incremental or differential immediately after running a full backup.




Bill R
Bill R
New Member
New Member (26 reputation)New Member (26 reputation)New Member (26 reputation)New Member (26 reputation)New Member (26 reputation)New Member (26 reputation)New Member (26 reputation)New Member (26 reputation)New Member (26 reputation)
Group: Forum Members
Posts: 18, Visits: 108
Drac144,  Well, that seems to be at variance with what I've read in a number of other posts, in particular ...
http://forum.macrium.com/FindPost473.aspx
http://forum.macrium.com/FindPost3355.aspxhttp://forum.macrium.com/FindPost289.aspx      (the end of this last post)
the last two posts being from Nick, a Macrium Rep.   Could I ask a Macrium Rep to confirm which understanding is correct, please?  (If necessary, I'll raise a ticket).
(And sorry about the poorly formatted links - I really struggled with the forum tools to get those in at all).

Separately, I've noted another comment from Nick at  the end of http://forum.macrium.com/FindPost11.aspx  in which he writes ...
You've hit on a weakness with the scripting and scheduling options in Reflect. Unfortunately, scripts and XML files are scheduled independently, and the new backup plan templates include 'Retention' rules that are only available in the XML. The solution is to 're-wire' the scripting logic so that scripts are called by the XML def. That way you only need to schedule the XML not the scripts. This functionality was originally going to be included in the initial v6 release but has now been re-scheduled for v6.1. v6.1 will be a Free upgrade for all v6 users

Since we are now on 6.1, I get the feeling this change may not have happened, but it certainly sounds like it might affect my robocopy issues.  I'll raise a separate post in the Scheduling section to ask about this (which, I guess, is where i should have placed this post in the first case).

Bill R


Edited 19 January 2016 12:53 AM by Bill R
Drac144
Drac144
Expert
Expert (737 reputation)Expert (737 reputation)Expert (737 reputation)Expert (737 reputation)Expert (737 reputation)Expert (737 reputation)Expert (737 reputation)Expert (737 reputation)Expert (737 reputation)
Group: Forum Members
Posts: 468, Visits: 1.8K
Interesting.  The information I gave you is, apparently, correct for running tasks involving DIFFERENT XML files.  It sounds like Reflect does some different logic if it gets multiple requests involving the SAME XML file.  I (obviously) did not know that.

I wonder how much time must pass for the logic to treat the multiple requests as tasks to run in order. If I issue a Full at 9:00 AM and an incremental at 9:01 AM will it ignore the incremental and just complete the full, or will it stack the incremental for completions AFTER the Full completes?  If the order is reversed, will it abort the incremental and do the full instead or stack them for sequential execution?  What are the timing rules in play here?
Bill R
Bill R
New Member
New Member (26 reputation)New Member (26 reputation)New Member (26 reputation)New Member (26 reputation)New Member (26 reputation)New Member (26 reputation)New Member (26 reputation)New Member (26 reputation)New Member (26 reputation)
Group: Forum Members
Posts: 18, Visits: 108
Drac144, Exactly the questions that were springing to my mind.  I got the impression from one of the postings that the resolution logic would only take into account backups of the same set that were SCHEDULED to start at exactly the same time, regardless of what time they actually started.  That suggests to me that the logic might inspect the Task Scheduler queue and then act accordingly.  I guess each such scheduled task could choose to 1) suppress any less-dominant matching backup task queued up behind it, and 2) abandon itself in the presence of any more dominant matching backup task queued up behind it.  But that's only a guess. "reflectservice.exe" seems to play a role somewhere in this process.

Richard V.
Richard V.
Most Valuable Professional
Most Valuable Professional (4.1K reputation)Most Valuable Professional (4.1K reputation)Most Valuable Professional (4.1K reputation)Most Valuable Professional (4.1K reputation)Most Valuable Professional (4.1K reputation)Most Valuable Professional (4.1K reputation)Most Valuable Professional (4.1K reputation)Most Valuable Professional (4.1K reputation)Most Valuable Professional (4.1K reputation)
Group: Forum Members
Posts: 2K, Visits: 8K
@Bill R ---  My own experience as well as previous answers in these forums do indicate that simultaneously scheduled Reflect operations are usually handled sequentially (i.e., each one being run and completed in turn) as I said.  But it is equally clear from the other authoritative answers that you've quoted that the "Macrium Reflect Scheduling Services" cannot possibly be limited to just that single method for handling simultaneously scheduled jobs when they are based on the same XML task description.  It may be noteworthy that the Windows scheduler entries do also include a {GUID} value as well as the -full, -diff, -inc command line argument.  I, for one, would be grateful if you would pass along whatever else you're able to find out about it by whatever means you may pursue.

In view of Macrium's reticence on the subject here so far, and as an alternative to opening a direct support ticket which you seem reluctant to do, have you considered an experimental approach that would log the results (return codes, or whatever else might be useful) for each instance of a minor (even miniscule) scheduled Reflect operation of the same "Grandfather-Father-Son" type as your primary project?  I'd do it for you myself, but I'm somewhat preoccupied with other issues at the moment ... and/or just too lazy, take your pick. Smile


Regards, Richard V. ("Arvy")
https://forum.macrium.com/uploads/images/afc5d4fe-5d25-4e25-be94-185e.png

Edited 20 January 2016 12:57 AM by Arvy
Gork
Gork
Guru
Guru (1.2K reputation)Guru (1.2K reputation)Guru (1.2K reputation)Guru (1.2K reputation)Guru (1.2K reputation)Guru (1.2K reputation)Guru (1.2K reputation)Guru (1.2K reputation)Guru (1.2K reputation)
Group: Forum Members
Posts: 591, Visits: 2.2K
I've found myself wondering the same thing as I've been reading this thread.  What piqued my interest is the fact that if you use the "Grandfather, Father, Son" template it sets the Full, Differential and Incremental to all run at 0900 hrs on the first Mon of every month.  (Diff and Inc actually run every Mon at 0900.)  While I've read in the past that Reflect will run multiple schedules at the same time sequentially, it didn't make any sense to me that an actual template would be set up to run a Full, Diff and Inc all at the same time.  So I figured there is something else at play here and have been watching the thread hoping to learn.
Bill R
Bill R
New Member
New Member (26 reputation)New Member (26 reputation)New Member (26 reputation)New Member (26 reputation)New Member (26 reputation)New Member (26 reputation)New Member (26 reputation)New Member (26 reputation)New Member (26 reputation)
Group: Forum Members
Posts: 18, Visits: 108
Well, I've just run some tests, and the results were contrary to my expectations.  It looks like there was NO process co-ordinating the backup tasks other than to ensure that they only ran one at a time, just as Drac was saying.

1) I ran a small backup job, with -full, -diff, & -inc schedules, using the generated VBScript.  In the first instance, I placed msgboxes before and after the reflect.exe invocation in the VBscript.  This permitted me to progress all three backup tasks to a point just prior to the reflect.exe invocation, so that I could then release the tasks in whatever order I wanted.  When I did so, the actual backup processes ran to completion in whatever order I released them, with no evidence of coordination other than to serialise the processes.  Any backups that ran AFTER the -full backup, completed with return code 0, but with an unsurprising message that no changes had been detected (as a result of which no backup file was created).

2) I then ran the same backup job, with no msgbox BEFORE the reflect.exe, in case the msgbox pause was interfering with any process attempting to coordinate the tasks.   The tasks tended to run in the order -full, -diff, -inc, but I fairly quickly had one set of tasks that ran in the order -inc, -full, -diff, creating TWO backup files as a result, with the 3rd not created because of lack of further changes.  And as they say, it only takes one false outcome to disprove a theory ...

For each test run, I was re-scheduling the backups to run simultaneously after a delay of 1-2 minutes.
I guess, it's still possible that some coordination takes place when the schedules are set using the standard XML, rather than generated script files, but I haven't tested that since my robocopy plans require that I use a generated script. So it looks like I will be resorting to Plan C - robocopy for the incrementals, with manual invocation for my -diffs and -fulls.

If I get the time, I may repeat these tests to confirm the results.

And, of course, I wasn't able to determine what return code would arise if a backup task was suppressed (other than for lack of changes) since that event never arose.

Bill R









Richard V.
Richard V.
Most Valuable Professional
Most Valuable Professional (4.1K reputation)Most Valuable Professional (4.1K reputation)Most Valuable Professional (4.1K reputation)Most Valuable Professional (4.1K reputation)Most Valuable Professional (4.1K reputation)Most Valuable Professional (4.1K reputation)Most Valuable Professional (4.1K reputation)Most Valuable Professional (4.1K reputation)Most Valuable Professional (4.1K reputation)
Group: Forum Members
Posts: 2K, Visits: 8K
Well, there's certainly no doubt that running simultaneously scheduled tasks one after the other is Reflect's normal way of handling them, but it does seem to be a rather inelegant method with this kind of Grandfather-Father-Son arrangment to say the least.  It's not surprising that you expected something a little more sophisticated based on those other replies that you quoted.  I'm quite sure that none of them were deliberately misleading and maybe you're right in supposing that they only apply when the scheduler runs XML task definitions directly.  I am surprised that no one from the Macrium team has jumped in here with some clarification by now, but they have been strangely quiet here recently and not just on this subject.  Too busy squashing development bugs in their forthcoming new super fast file system change block tracker, I suppose. Wink

In any case, many thanks for taking the time to pass along what you were able to discover by experimentation.  And the best of good luck getting things set up to work as you want them to.

Regards, Richard V. ("Arvy")
https://forum.macrium.com/uploads/images/afc5d4fe-5d25-4e25-be94-185e.png

Edited 22 January 2016 3:54 AM by Arvy
Drac144
Drac144
Expert
Expert (737 reputation)Expert (737 reputation)Expert (737 reputation)Expert (737 reputation)Expert (737 reputation)Expert (737 reputation)Expert (737 reputation)Expert (737 reputation)Expert (737 reputation)
Group: Forum Members
Posts: 468, Visits: 1.8K
That is much more as I would expect.  It was surprising that Reflect would have some kind of process to detect the specific instance of multiple backups using the same XML occurring within a few seconds of each other.  Processing requests in the order received is much simpler.  I am surprised someone from Macrium has not responded with the actual operation of Reflect in the conditions we are discussing.  I would not think this is a company secret.

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