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
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 3:28 PM
Ok, I didn't realize (or maybe forgot from earlier in this thread) that your batch file involves doing things that you expect to be visible to the user.  Reflect by default runs scheduled tasks under the SYSTEM account, which doesn't allow that because it's a separate user account running in a separate context.  If you go to Defaults and Settings > Schedule, you can change that to run under your own user account -- although be aware that if you do this, you'll have to remember to update that saved password if you ever change the Windows account password, otherwise backups will break.  And actually I'm not 100% sure even that will allow this to work as desired for you, because I think scheduled tasks run in a separate context even when the user account matches, so it might not be able to surface content in your actual user session.  But give it a try.

Regarding the countdown, that's under Defaults and Settings > Advanced > Advanced Backup Settings.  Just uncheck the notification option.

it didn't run the script.So the backup failed. But the suppression of M's backup warning worked.
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 not a lot of information to go on, especially if it's not even precisely accurate.  Saying "it didn't run the script" may not even be accurate. The script not running at all is different, and would have different possible causes, compared to the script running and erroring out, or running and getting stalled somewhere.  The more information you can provide about problem behavior, the more likely others will be able to help.

You can manually invoke scheduled tasks under the Scheduled Backups tab.  That's also where you will see a exit code for the last execution of the task.  What does that say?  And for diagnostic purposes it might also help to customize the batch file to do something to indicate how far it's getting, such as writing out to a log file that you can review later.  But if the Before batch file called by your script involves displaying an interactive prompt and waiting for input before proceeding, that might be an issue, because you might have an interactive prompt in a user context that your user session can't access.  In that case, the script will be running but not able to complete.

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 3:57 PM
That's not a lot of information to go on, especially if it's not even precisely accurate.  Saying "it didn't run the script" may not even be accurate. The script not running at all is different, and would have different possible causes, compared to the script running and erroring out, or running and getting stalled somewhere.  The more information you can provide about problem behavior, the more likely others will be able to help.

You can manually invoke scheduled tasks under the Scheduled Backups tab.  That's also where you will see a exit code for the last execution of the task.  What does that say?  And for diagnostic purposes it might also help to customize the batch file to do something to indicate how far it's getting, such as writing out to a log file that you can review later.  But if the Before batch file called by your script involves displaying an interactive prompt and waiting for input before proceeding, that might be an issue, because you might have an interactive prompt in a user context that your user session can't access.  In that case, the script will be running but not able to complete.

"didn't run" implies you are correct that I have an interactive prompt in a user context that my user session can't access, because that is the first thing it does after it tests for the existence of the drive (so it prompts me to turn on the drive, THEN pops up my "I'm running" window). I guess I may need to research if it is possible to run a program from my "user context" ino my REAL context and how to do it.
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
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.
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.

I'll give that a try. However I LIKE the fact that it has to run while I'm logged on (otherwise, how can the drive switch be turned on?)
PS. I have enquired with some manufacturers about USB switches that can be involved via KASA smart programming, without voice., which would solve that problem. Nobody makes anything other than 110V AC switches.
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
Then it sounds like that might be a good solution for you.  I was just explaining why Reflect-generated scheduled tasks don't work like that.  If they did, it wouldn't be possible to have scheduled backups of most servers, where user logons are rare.  And having to stay logged in until a backup completes could be annoying in that scenario as well.

JK
JK
Master
Master (1.8K reputation)Master (1.8K reputation)Master (1.8K reputation)Master (1.8K reputation)Master (1.8K reputation)Master (1.8K reputation)Master (1.8K reputation)Master (1.8K reputation)Master (1.8K reputation)Master (1.8K reputation)
Group: Forum Members
Posts: 1.2K, Visits: 4.4K
@DocDJ
The primary reason for my "before" script is to warn me to turn on the switch for the target and to pop up a window saying the backup is in progress.


FYI, Steve Smith (MVP in the Acronis Forum) developed a Powershell script to connect and disconnect an external USB drive, without the need for manual intervention.  It is available here:

https://forum.acronis.com/comment/557182#comment-557182

                                
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
^ If the drive remains physically connected, then malware can potentially do whatever that PowerShell script can.
JK
JK
Master
Master (1.8K reputation)Master (1.8K reputation)Master (1.8K reputation)Master (1.8K reputation)Master (1.8K reputation)Master (1.8K reputation)Master (1.8K reputation)Master (1.8K reputation)Master (1.8K reputation)Master (1.8K reputation)
Group: Forum Members
Posts: 1.2K, Visits: 4.4K
JP, good point, and this is also discussed somewhat in the linked thread (see here).  Nonetheless, could be a reasonable strategy considering that what is possible is not always probable.

                                
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
JK - 3 April 2022 8:44 PM
JP, good point, and this is also discussed somewhat in the linked thread (see here).  Nonetheless, could be a reasonable strategy considering that what is possible is not always probable.

having had a ransomware attack on a system I supported (the user clicked on a poison link) and all the attacks on FB users, I am more than a little paranoid. I have been digitizing 70 years' worth of my own photos and family heirloom shots to conserve space. If I get attacked, they are gone, with nothing for my descendants to look at (assuming they might want to) once the paper is chucked out. That's why I'm looking for a Kasa enabled USB switch, whether voice operated or programmable, for unattended operations. At the moment, I schedule my backups for a time when I am (generally) at my PC, so I can manually power them on, but I need to be reminded to NOT power them off while the backups are running. So this batch operation is really important to me. My PC is always on from 6AM to midnight. But in idle mode (NEVER sleep mode), it uses about as much power as a light bulb. Acronis allows this and my batch files work well, but Acronis has other problems that Macrium seems not to have, not to mention annual "subscription" fees.
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