how can I get Reflect to automatically do differentials after a full backup (from the command line)


how can I get Reflect to automatically do differentials after a full...
Author
Message
Beardy
Beardy
Expert
Expert (813 reputation)Expert (813 reputation)Expert (813 reputation)Expert (813 reputation)Expert (813 reputation)Expert (813 reputation)Expert (813 reputation)Expert (813 reputation)Expert (813 reputation)Expert (813 reputation)
Group: Forum Members
Posts: 640, Visits: 2.4K
Well I've not yet transferred to the Macrium scheduler, but the Windows one can certainly run batch files that open visibly to the logged in user if they're set to run in their account, I ran my backups that way for years (and am considering going back to it, an upgrade switched the schedule to system & I've yet to bother reverting the change) just because I could monitor robocopy's progress post backup that way.
jphughan
jphughan
Macrium Evangelist
Macrium Evangelist (18K reputation)Macrium Evangelist (18K reputation)Macrium Evangelist (18K reputation)Macrium Evangelist (18K reputation)Macrium Evangelist (18K reputation)Macrium Evangelist (18K reputation)Macrium Evangelist (18K reputation)Macrium Evangelist (18K reputation)Macrium Evangelist (18K reputation)Macrium Evangelist (18K reputation)
Group: Forum Members
Posts: 12K, Visits: 72K
That's true, but even when Reflect is using Windows Task Scheduler, the scheduled tasks that Reflect creates within WTS don't work that way.  And to my knowledge it's not possible to have Reflect create them in the way that would make them interactive within the logged-on user's session.

Beardy
Beardy
Expert
Expert (813 reputation)Expert (813 reputation)Expert (813 reputation)Expert (813 reputation)Expert (813 reputation)Expert (813 reputation)Expert (813 reputation)Expert (813 reputation)Expert (813 reputation)Expert (813 reputation)
Group: Forum Members
Posts: 640, Visits: 2.4K

Indeed, but the path & name of the batch is known, & Windows has this "create task" wizard within the task scheduler, which is quite friendly to use, created tasks aren't that difficult to edit eithe.


DocDJ
DocDJ
New Member
New Member (28 reputation)New Member (28 reputation)New Member (28 reputation)New Member (28 reputation)New Member (28 reputation)New Member (28 reputation)New Member (28 reputation)New Member (28 reputation)New Member (28 reputation)New Member (28 reputation)
Group: Forum Members
Posts: 27, Visits: 50
jphughan - 3 April 2022 4:49 PM
You can manually create scheduled tasks in Windows Task Scheduler that work that way. Just have the scheduled task call PowerShell with the “File” parameter to specify the script path and the desired backup type. And then set the task to run as your user account and only while you’re logged in. Those scheduled tasks won’t show up in Reflect, but you can manage them from Windows Task Scheduler.The catch to running backups in your user session is that a) they won’t run if you’re not logged in, and b) they will be cancelled if you log off mid-backup. Background scheduled tasks don’t have those limitations.
Doesn't this technique "specify the script path and the desired backup type" go back to making my batch file responsible for deciding when to do Diff vs Full backups?

Beardy
Beardy
Expert
Expert (813 reputation)Expert (813 reputation)Expert (813 reputation)Expert (813 reputation)Expert (813 reputation)Expert (813 reputation)Expert (813 reputation)Expert (813 reputation)Expert (813 reputation)Expert (813 reputation)
Group: Forum Members
Posts: 640, Visits: 2.4K
Well something needs to specify it, can be the schedule, can be something in your script (batch powershell or other). Can even be a parameter passed to your script.
Reflect doesn't determine what backup type to do, with the exception that if there's none you get a full.

Retention policies won't help you, they're about storage space management, and what history you retain, not what type of backup is done on any particular run.

I'm not sure we can be a great deal more help without knowing exactly what you want to happen, some things would be easy to simply schedule..
e.g. Full every Monday, diff every other day
Full first Monday of month, Diff every Tuesday, inc other days..
Pretty much any regular pattern is doable, peculiar ones are tedious (or can be) to set up & might need the Windows scheduler to do.

Some things will take some scripting to actually figure out what you have, so say "Every time I've accumulated 9 diffs I want a new full" regardless of producing backups on an ad-hoc basis with no regularity would take measures like parsing a directory listing & counting them to set a parameter based off the findings.. you'd have to do that the hard way.  But that's pretty much your only option if you do sporadic irregular backups & want a set pattern of so many diffs after each full.

Frankly (my opinion) you're far better deciding a regular schedule you can just set..
Edited 4 April 2022 11:34 AM by Beardy
DocDJ
DocDJ
New Member
New Member (28 reputation)New Member (28 reputation)New Member (28 reputation)New Member (28 reputation)New Member (28 reputation)New Member (28 reputation)New Member (28 reputation)New Member (28 reputation)New Member (28 reputation)New Member (28 reputation)
Group: Forum Members
Posts: 27, Visits: 50
Beardy - 4 April 2022 11:29 AM
Well something needs to specify it, can be the schedule, can be something in your script (batch powershell or other). Can even be a parameter passed to your script.
Reflect doesn't determine what backup type to do, with the exception that if there's none you get a full.

Retention policies won't help you, they're about storage space management, and what history you retain, not what type of backup is done on any particular run.

I'm not sure we can be a great deal more help without knowing exactly what you want to happen, some things would be easy to simply schedule..
e.g. Full every Monday, diff every other day
Full first Monday of month, Diff every Tuesday, inc other days..
Pretty much any regular pattern is doable, peculiar ones are tedious (or can be) to set up & might need the Windows scheduler to do.

Some things will take some scripting to actually figure out what you have, so say "Every time I've accumulated 9 diffs I want a new full" regardless of producing backups on an ad-hoc basis with no regularity would take measures like parsing a directory listing & counting them to set a parameter based off the findings.. you'd have to do that the hard way.  But that's pretty much your only option if you do sporadic irregular backups & want a set pattern of so many diffs after each full.

Frankly (my opinion) you're far better deciding a regular schedule you can just set..

@Beardy I understand the scheduling operation and I think I may be stuck with creating Windows-scheduled programs which call Macrium via command-line and tell it what kind of backup to do. HOWEVER, I don't think that batch files will solve my problem of getting my pre-and post window dialogs to show up at the right times. Yes, I can handle the pre-backup popup in the batch file that STARTS Macrium, but in order to create the POST- backup window, that batch file must remain on my screen until the backup is finished and Macrium exits. (As a  test, I created a shortcut to my PRE- bat file and set it to run "minimized". But doing that prevented it from displaying my prompt message to turn on the drive.) I will try a real WiIn32 program instead of a BAT or CMD file and have it prompt for and test for the drive to come on line, then have it call Macrium, then prompt me to turn off the drive and close the already open reminder window. That will make it all one program (not just a batch file). Since the two programs to prompt me are already Win32, I can merge them. That's a LOT more work to help me dump Acronis, but may be worth it.

HOWEVER, I know that Macrium uses a separate context to run the backups and scripts, so they can't write to the screen, but I will test to see if they can still pop the window and let IT appear on the screen.
DocDJ
DocDJ
New Member
New Member (28 reputation)New Member (28 reputation)New Member (28 reputation)New Member (28 reputation)New Member (28 reputation)New Member (28 reputation)New Member (28 reputation)New Member (28 reputation)New Member (28 reputation)New Member (28 reputation)
Group: Forum Members
Posts: 27, Visits: 50
DocDJ - 4 April 2022 12:24 PM
Beardy - 4 April 2022 11:29 AM
Well something needs to specify it, can be the schedule, can be something in your script (batch powershell or other). Can even be a parameter passed to your script.
Reflect doesn't determine what backup type to do, with the exception that if there's none you get a full.

Retention policies won't help you, they're about storage space management, and what history you retain, not what type of backup is done on any particular run.

I'm not sure we can be a great deal more help without knowing exactly what you want to happen, some things would be easy to simply schedule..
e.g. Full every Monday, diff every other day
Full first Monday of month, Diff every Tuesday, inc other days..
Pretty much any regular pattern is doable, peculiar ones are tedious (or can be) to set up & might need the Windows scheduler to do.

Some things will take some scripting to actually figure out what you have, so say "Every time I've accumulated 9 diffs I want a new full" regardless of producing backups on an ad-hoc basis with no regularity would take measures like parsing a directory listing & counting them to set a parameter based off the findings.. you'd have to do that the hard way.  But that's pretty much your only option if you do sporadic irregular backups & want a set pattern of so many diffs after each full.

Frankly (my opinion) you're far better deciding a regular schedule you can just set..

@Beardy I understand the scheduling operation and I think I may be stuck with creating Windows-scheduled programs which call Macrium via command-line and tell it what kind of backup to do. HOWEVER, I don't think that batch files will solve my problem of getting my pre-and post window dialogs to show up at the right times. Yes, I can handle the pre-backup popup in the batch file that STARTS Macrium, but in order to create the POST- backup window, that batch file must remain on my screen until the backup is finished and Macrium exits. (As a  test, I created a shortcut to my PRE- bat file and set it to run "minimized". But doing that prevented it from displaying my prompt message to turn on the drive.) I will try a real WiIn32 program instead of a BAT or CMD file and have it prompt for and test for the drive to come on line, then have it call Macrium, then prompt me to turn off the drive and close the already open reminder window. That will make it all one program (not just a batch file). Since the two programs to prompt me are already Win32, I can merge them. That's a LOT more work to help me dump Acronis, but may be worth it.

HOWEVER, I know that Macrium uses a separate context to run the backups and scripts, so they can't write to the screen, but I will test to see if they can still pop the window and let IT appear on the screen.

Well, unless I messed up the script, the test failed - bummer. So I guess it all has to be done outside Macrium. It would be nice if Macrium had an option to run the backup in the users' context (not just user's authority), so the commands called by the scripts could output to the console.
Here's how I modified my starting script:
$strRunAtStartApp = 'E:\DJs Documents\my_vs_executables\running_program-reminder.exe;
$strRunAtStartArgs = 'testing"';

jphughan
jphughan
Macrium Evangelist
Macrium Evangelist (18K reputation)Macrium Evangelist (18K reputation)Macrium Evangelist (18K reputation)Macrium Evangelist (18K reputation)Macrium Evangelist (18K reputation)Macrium Evangelist (18K reputation)Macrium Evangelist (18K reputation)Macrium Evangelist (18K reputation)Macrium Evangelist (18K reputation)Macrium Evangelist (18K reputation)
Group: Forum Members
Posts: 12K, Visits: 72K
No, the technique I described would not have required you to have your batch file decide which backup to run. You would have had two separate tasks, one for a Full and one for a Diff. The tasks would have called the same batch file, but each task would have been configured to pass a different PARAMETER to that batch file. This mimics what Reflect does when you define schedules within it. The reason you’d have been creating a scheduled task manually would have been to configure one that can run interactively.
DocDJ
DocDJ
New Member
New Member (28 reputation)New Member (28 reputation)New Member (28 reputation)New Member (28 reputation)New Member (28 reputation)New Member (28 reputation)New Member (28 reputation)New Member (28 reputation)New Member (28 reputation)New Member (28 reputation)
Group: Forum Members
Posts: 27, Visits: 50
jphughan - 4 April 2022 1:24 PM
No, the technique I described would not have required you to have your batch file decide which backup to run. You would have had two separate tasks, one for a Full and one for a Diff. The tasks would have called the same batch file, but each task would have been configured to pass a different PARAMETER to that batch file. This mimics what Reflect does when you define schedules within it. The reason you’d have been creating a scheduled task manually would have been to configure one that can run interactively.

Thanks. I understand a little better now. My needs DO require the interactive activity pre- and post- backup. So I am going to try it with 2 Windows -scheduled tasks calling the same batch file passing it "Full" or "Diff" based on my needs and letting IT do the pop-ups. I think part of my thick-headedness has been thinking of "schedule" as "when AND how to run the backup" as opposed to Macrium's when/what to purge. 


jphughan
jphughan
Macrium Evangelist
Macrium Evangelist (18K reputation)Macrium Evangelist (18K reputation)Macrium Evangelist (18K reputation)Macrium Evangelist (18K reputation)Macrium Evangelist (18K reputation)Macrium Evangelist (18K reputation)Macrium Evangelist (18K reputation)Macrium Evangelist (18K reputation)Macrium Evangelist (18K reputation)Macrium Evangelist (18K reputation)
Group: Forum Members
Posts: 12K, Visits: 72K
A scheduled task DOES handle "when and how to run the backup".  The retention policy purges occur as part of the backup job; they are not a mechanism that must be run separately.  So I'm not sure it's entirely clear yet.  But I'll try again.

A basic schedule setup involves two main components.
  • An XML definition file, which descries the backup job in terms of WHAT to back up, WHERE to store the backups, WHAT (if any) retention policy to enforce, etc.  But it does NOT handle WHEN to run it (the schedule), nor does it handle the TYPE of backup to perform (Full/Diff/Inc).
  • One or more scheduled tasks.  These are entirely separate entities from the XML definition file.  A scheduled task is configured to perform an action on a particular schedule.  In a regular case, the "action" is to run the Reflect executable.  In addition to running that application, the task itself can pass parameters to that application.  One of those parameter will be the path to the XML definition file, so you're saying "Whenever this scheduled task fires on whatever schedule has been configured for it, tell Reflect to run this job".  Then you can also optionally specify a backup TYPE parameter so you can say "Specifically, run a Differential backup of this job".  So if you want to schedule various backup types of the same job, then you'll have one scheduled task for each type, and those scheduled tasks will be identical EXCEPT for the single parameter that each task is configured to send to Reflect.  There are other parameters that may be appropriate to use when calling Reflect, documented here.
But in YOUR case where you want to run Before and After batch files, you'd have some additional complexity.  You now need to have a script that does all of that, i.e. a) calls your Before batch file, b) runs Reflect, including passing it the appropriate parameters, and c) running your After batch file.  And if you want to use the same "master script" for both types of Reflect backups, then that "master script" itself needs to support receiving a backup type parameter and be configured to pass that to Reflect at the point in that script where it runs Reflect.  (The other parameters that should be passed to Reflect, such as the XML definition file and anything else you might want to use in the documentation, can probably be hardcoded into your script as part of the command it runs at that point.)  So now, you'll still have one or more scheduled tasks as above, but instead of calling Reflect and providing all Reflect-appropriate parameters, they will instead call your "master script" and specify only a backup type parameter, because the script will have the rest hardcoded to pass to Reflect.

I don't know if I've made it clearer or more confusing at this point, but hopefully it's the former.

Edited 4 April 2022 3:23 PM by jphughan
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