Undocumented Switch


Author
Message
TawnyFrogmouth
TawnyFrogmouth
New Member
New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)
Group: Forum Members
Posts: 5, Visits: 11
I note that the Backup scripts that Reflect generates include '-g' following the .xml file path.  Can someone please explain what this switch does?  I had problems with a Task being rescheduled to run a second time a few seconds after it ran the first time.  Removing the the '-g' argument solved my problem, but I don't know why.
Froggie
Froggie
Guru
Guru (1.5K reputation)Guru (1.5K reputation)Guru (1.5K reputation)Guru (1.5K reputation)Guru (1.5K reputation)Guru (1.5K reputation)Guru (1.5K reputation)Guru (1.5K reputation)Guru (1.5K reputation)
Group: Forum Members
Posts: 831, Visits: 7K
you need the -g if you have simultaneous schedules at the same time, ie Full, Diff or Inc.  The -g will allow Reflect to run the proper schedule (Full over Diff over Inc.
TawnyFrogmouth
TawnyFrogmouth
New Member
New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)
Group: Forum Members
Posts: 5, Visits: 11
That is interesting.  It would be useful to know the mechanism that Reflect uses to achieve this.  Does it manipulate the Scheduled Tasks?  I expect that it does.
In my experience with Win 7, a VBScript initiated by a SYSTEM Task (as used by Reflect) can't interact with the users desktop.  Therefore I have the SYSTEM Task schedule a User Task to run after a few seconds.  It is the User Task that runs the Script that it interacts with the user then calls Reflect to do a -full backup in the manner of the example scripts generated by Reflect.  We are in a Test environment - there are no Diff or Inc backups scheduled in my tests.
What happens with the -g switch is seconds after the Reflect generated SYSTEM Task is triggered, the same Task is Rescheduled to run a second time.  Without the -g parameter, the Task is only Scheduled to run once.
One thing that I haven't done is the copy the <Data> from the SYSTEM Task to my User Task, since I don't know its role.  Perhaps Reflect.exe is looking for it and can't find it.
I expect that I can probably suppress the second invocation of my script but it will be messy.  Given your explanation of what the -g switch is for I can see that it is desirable to include it.
Any enlightening ideas?

Nick
Nick
Macrium Representative
Macrium Representative (2.6K reputation)Macrium Representative (2.6K reputation)Macrium Representative (2.6K reputation)Macrium Representative (2.6K reputation)Macrium Representative (2.6K reputation)Macrium Representative (2.6K reputation)Macrium Representative (2.6K reputation)Macrium Representative (2.6K reputation)Macrium Representative (2.6K reputation)
Group: Administrators
Posts: 1.5K, Visits: 8.1K
It would be useful to know the mechanism that Reflect uses to achieve this. Does it manipulate the Scheduled Tasks?


The '-g' switch causes Reflect to create a system wide named global mutex using the name of the xml file and the backup type.  It doesn't affect the scheduled task in any way. 

The mutex is then used to determine whether concurrent backups for the same xml file should be executed or should exit with code 0x06 (conflict). The determination for exit or execution is based on Full over Diff over Inc. 

Kind Regards

Nick - Macrium Support

TawnyFrogmouth
TawnyFrogmouth
New Member
New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)
Group: Forum Members
Posts: 5, Visits: 11
Thank you very much Nick for your reply.  I shall have to investigate the anomalous behaviour that I experienced further to pin down the cause.  If appropriate I shall report back.
TawnyFrogmouth
TawnyFrogmouth
New Member
New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)
Group: Forum Members
Posts: 5, Visits: 11

I can confirm that the behaviour that I described above DOES occur.  It may be unintentional, but it does occur.

From the Reflect dashboard we schedule a Backup which calls Parent.vbs.
Lets call that that task "MacriumTask"
Parent.vbs creates a new task which we can call "UserTask".
UserTask schedules Child.vbs to be run a few seconds later.
When Child.vbs runs it calls Reflect.exe with arguments that include -full and -g.
At the same time that Reflect.exe Is called by Child.vbs, something causes MacriumTask to be rescheduled to run Parent.vbs a second time.
Thus MacriumTask Is triggered twice In a matter of a few seconds even though the user only scheduled it once.
If Reflect.exe is not passed the -g argument, this behaviour does not occur.

The reason for doing this is to allow the User to interact with the Backup Process.  Parent.vbs can't interact with the user because it is in the SYSTEM environment.
Child.vbs runs using user credentials and so the user can interact with it.


Nick
Nick
Macrium Representative
Macrium Representative (2.6K reputation)Macrium Representative (2.6K reputation)Macrium Representative (2.6K reputation)Macrium Representative (2.6K reputation)Macrium Representative (2.6K reputation)Macrium Representative (2.6K reputation)Macrium Representative (2.6K reputation)Macrium Representative (2.6K reputation)Macrium Representative (2.6K reputation)
Group: Administrators
Posts: 1.5K, Visits: 8.1K
The reason for doing this is to allow the User to interact with the Backup Process


If you are referring to the backup wizard, you *can* interact with the backup process running as SYSTEM.  Press Ctrl+Alt+M to bring up the backup wizard or right click on the notification tray icon and select 'Show'.

Kind Regards

Nick - Macrium Support

TawnyFrogmouth
TawnyFrogmouth
New Member
New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)New Member (6 reputation)
Group: Forum Members
Posts: 5, Visits: 11
Thanks Nick,
I don't understand. Ctrl+Alt+M gives me the summary log for the last completed backup.  Right Click on the notification icon - "Show" already has a green tick against it and just shows the User Interface (or Dashboard as I might have called it).
By "Interact with the user" I mean "Guide the user through preparations that they may need to undertake prior to the actual Backup; Seek their cooperation to undertake a Backup now, or give them the option to defer it till later etc.  After the backup is complete, find out if the user is still there and what they wish to do next etc.  Task Scheduler does provide options to prevent tasks if a laptop is on Battery Power, or a computer doesn't have a particular network connection for example  On the other hand the User may be in a position to rectify those issues to allow a backup to proceed as scheduled or be able to nominate a more appropriate time.  There is more to it than that, but that is what I mean by User Interaction.  I would like to improve the number of successful Backups.
I expect to do that with a Script that is scheduled in the usual manner, but which undertakes certain user interaction tasks prior to the call to Reflect.exe, and continues after Reflect.exe returns.  To the best of my knowledge such interaction can't occur from a script scheduled by SYSTEM as is generated by the Wizard, but it can occur from a script scheduled using user credentials.  Hence my desire to have the SYSTEM task/script schedule a user task/script to do what I desire.
I have a workaround for the -g issue, so I am not losing any sleep over it.  I am just letting you know that there is an unexpected consequence of using the -g switch.
Regards,
Rik
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search