Does "Enable directory synchronization" actually do anything?


Author
Message
Dan Cook
Dan Cook
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: 3, Visits: 8
Under menu item "Other Tasks -> Edit Defaults... -> Scripts -> Duplicate I've selected "Enable directory synchronization" and set the preferred location. But my backups don't get copied to that location. According to the documentation when I click the OK button a script is generated. I don't see evidence of this script, and in any case am I supposed to do something with the script? Like save it as a file and then enter that filename at "Run a script or program at the end"? I know the Robocopy command that would do the trick but I was hoping Macrium would automatically make the duplication occur when I tick the box for directory synchronization.
jphughan
jphughan
Most Valuable Professional
Most Valuable Professional (4.9K reputation)Most Valuable Professional (4.9K reputation)Most Valuable Professional (4.9K reputation)Most Valuable Professional (4.9K reputation)Most Valuable Professional (4.9K reputation)Most Valuable Professional (4.9K reputation)Most Valuable Professional (4.9K reputation)Most Valuable Professional (4.9K reputation)Most Valuable Professional (4.9K reputation)
Group: Forum Members
Posts: 3.4K, Visits: 25K
The Edit Defaults section specifies the default settings that will used for new scripts that you generate going forward; changing settings there does not trigger any immediate behavior on its own.  To generate a script, right-click a definition file under the Backup Definition Files tab (as shown as the first step of the KB article you linked) and choose "Generate VBS Script" or "Generate PowerShell Script", whichever you prefer.  Then you'll see the various options that you found under Edit Defaults, and you'll find that any settings you changed under Edit Defaults will be used as the default settings here.  Make any additional customizations you want for this specific script you're generating, choose where you want to save the script file under the Output section, and click OK.  At this point, you should have your script file at the desired location, and Reflect will have it listed under the VBScript Files or PowerShell Files tab, as appropriate.  If you want to run it on a schedule, you should remove all schedule entries from the definition file (Backup Definition Files Tab > right-click definition file > Schedule) and instead add the schedule entries to that script instead.  When you run that script, you should find that directory synchronization works.

Edited 29 January 2018 9:11 PM by jphughan
Dan Cook
Dan Cook
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: 3, Visits: 8
jphughan - 29 January 2018 9:03 PM
The Edit Defaults section specifies the default settings that will used for new scripts that you generate going forward; changing settings there does not trigger any immediate behavior on its own.  To generate a script, right-click a definition file under the Backup Definition Files tab and choose "Generate VBS Script" or "Generate PowerShell Script", whichever you prefer.  Then you'll see the various options that you found under Edit Defaults, and you'll find that any settings you changed under Edit Defaults will be used as the default settings here.  Make any additional customizations you want for this specific script you're generating, choose where you want to save the script file under the Output section, and click OK.  At this point, you should have your script file at the desired location, and Reflect will have it listed under the VBScript Files or PowerShell Files tab, as appropriate.  If you want to run it on a schedule, you should remove all schedule entries from the definition file (Backup Definition Files Tab > right-click definition file > Schedule) and instead add the schedule entries to that script instead.  When you run that script, you should find that directory synchronization works.

Couldn't I just create a .bat file with the relevant Robocopy command and point to that batch file under "Run a script or program at the end"? I think for my purposes that's all the elegance I need, and sounds like less work than tweaking a backup definition which is working like a charm.
jphughan
jphughan
Most Valuable Professional
Most Valuable Professional (4.9K reputation)Most Valuable Professional (4.9K reputation)Most Valuable Professional (4.9K reputation)Most Valuable Professional (4.9K reputation)Most Valuable Professional (4.9K reputation)Most Valuable Professional (4.9K reputation)Most Valuable Professional (4.9K reputation)Most Valuable Professional (4.9K reputation)Most Valuable Professional (4.9K reputation)
Group: Forum Members
Posts: 3.4K, Visits: 25K
Dan Cook - 29 January 2018 9:08 PM

Couldn't I just create a .bat file with the relevant Robocopy command and point to that batch file under "Run a script or program at the end"? I think for my purposes that's all the elegance I need, and sounds like less work than tweaking a backup definition which is working like a charm.

The "Run a script or program at the end" setting under Edit Defaults does NOT mean, "After every Reflect job completes, run this batch file."  There actually isn't a way to have an application-wide execution policy like that.  Instead, it means, "For any VBS/PowerShell script I decide to create from a definition file going forward, default to having this script/application specified as the post-job script/application."  That setting and the others under Edit Defaults > Scripts are there as a convenience for people who need to create a lot of script files, since they can specify their desired settings once under Edit Defaults and have all future scripts default to those settings rather than having to set them on every single script they create.

Reflect does not directly support calling a script or application before or after a job.  However, it does support being called by a script ITSELF, and of course a script that calls Reflect can also call other scripts/applications before and/or after doing so.  To that end, Reflect includes this script creation functionality that will generate a working script that calls Reflect to run the selected definition file, and if while generating that particular script from that particular definition file you enable the "Run a script or program at the end" option, the script that Reflect generates will call that OTHER application/script you specified there -- although if all you want is Robocopy, I personally would try the built-in Directory Synchronization option first.  This design of supporting pre-/post-job execution by having Reflect generate a script that calls Reflect rather than supporting it natively also means that more advanced users can take those initial Reflect-generated VBS/PowerShell scripts and customize them manually even further.  But for what it's worth, I do agree that it makes things a bit confusing.  When I first encountered these settings, I actually figured it worked the way you've been thinking it does.

Edited 29 January 2018 9:35 PM by jphughan
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