Automated Scheduling to Pause and Resume a Cache?

FAQ, getting help, user experience about PrimoCache
Post Reply
BonzaiDuck
Level 7
Level 7
Posts: 88
Joined: Wed Jan 11, 2017 12:57 am

Automated Scheduling to Pause and Resume a Cache?

Post by BonzaiDuck »

Last year, I had a problem with a two-tiered caching of an SATA HDD, which I only suspected arose from my daily scheduled Macrium Reflect backup. It would require me to occasionally run CHKDSK repairs of the source HDD. I haven't proven that the two-tiered caching -- RAM-cache on top of SSD-(NVME)-Cache -- was the culprit, but when I used SSD-caching exclusively without allocating RAM for a cache, the problem disappeared.

My Macrium backups are scheduled Monday through Friday at 9 AM.

Is there a way to use Windows features to schedule a pause and resumption to caching around the time that the backup occurs?
User avatar
Support
Support Team
Support Team
Posts: 3628
Joined: Sun Dec 21, 2008 2:42 am

Re: Automated Scheduling to Pause and Resume a Cache?

Post by Support »

How about using CLI commands to pause/resume in a script/batch file?
BonzaiDuck
Level 7
Level 7
Posts: 88
Joined: Wed Jan 11, 2017 12:57 am

Re: Automated Scheduling to Pause and Resume a Cache?

Post by BonzaiDuck »

support wrote:How about using CLI commands to pause/resume in a script/batch file?
Well, Bro, you're "support" and you know what is possible. Would that approach allow me to schedule unattended pause and resume?

Also, I'm rusty on my old PC supremacy confidence, and if it doesn't bother you, could you explain "CLI commands?" Or are talking about "Command Line interface" with CMD or Powershell? Perhaps assist me in writing the batch file? I assume I'd only use Notepad to create it, and then "put it somewhere." But the desirable characteristic would be to make it a scheduled pair of tasks.

Again, the problem there might be an arbitrary time window for the Macrium backup. A differential backup, occurring on a Monday, might take an hour or more, while an incremental backup might take 10 or 15 minutes.

I'd be interested in pursuing your suggestion regardless of it panning out, but for right now, I'm just keeping the Primo dialog open and minimized, so I can "resume" the cache for gaming or activity that matters, and "pause" it otherwise. Perhaps I should just try testing this again to see if I have to make CHKDSK corrections after a week or more.
User avatar
Support
Support Team
Support Team
Posts: 3628
Joined: Sun Dec 21, 2008 2:42 am

Re: Automated Scheduling to Pause and Resume a Cache?

Post by Support »

Yes, I'm talking about the "Command Line Interface" with CMD/Powershell. You may create a new text file, edit it and change the file extension from ".txt" to ".bat". Then you can use Windows Task Scheduler to create a new task and schedule running time. The problem here is when to resume a cache because backup time taken is not fixed as you said. It is better if Macrium backup allows to execute additional user-defined tasks when it finishes the backup process. But I don't know if Macrium backup has such feature or not.

At least you can just click on these two .bat files, one for pausing and the other for resuming, in a simple and fast way instead of running PrimoCache GUI program.

Commands to pause/resume a cache task are:
rxpcc pause -c #tasked
rxpcc resume -c #tasked

For help, please type "rxpcc ? pause" or "rxpcc ? resume".
You must run these commands with Administrative privileges. For more information about CLI, please see
http://www.romexsoftware.com/en-us/prim ... rface.html
BonzaiDuck
Level 7
Level 7
Posts: 88
Joined: Wed Jan 11, 2017 12:57 am

Re: Automated Scheduling to Pause and Resume a Cache?

Post by BonzaiDuck »

Thanks, Support . . .

I use similar batch files on another system to change Power profiles -- allowing the computer to sleep/hibernate, or just stay awake.

Truth is, it isn't much to leave the Primo GUI running minimized. It never interferes with anything.

In regard to the issues behind this thread, I've now noticed that this matter of backups causing minor drive errors on a two-tiered cached drive -- doesn't happen anymore -- or doesn't seem to. I haven't been pausing the cache for a few days now.

The drive that gave me trouble was a 2.5" Seagate Barracuda 2TB disk with 128 MB cache of its own. I replaced it with an SSD -- which ordinarily wouldn't "need" caching, but I did it anyway, caching first to NVME and then to RAM. And I'm wondering if an internal built-in 128MB HDD cache of the Seagate might cause the troubles I'd mentioned.

Anytime it had happened with the Seagate, it was easy enough to repair, but it's an imperfection nobody would want to live with, because it interrupts Macrium, which then won't complete its backup and throws a message indicating a need for CHKDSK.
tyraelmetanamede
Level 4
Level 4
Posts: 28
Joined: Tue Feb 05, 2019 11:17 pm

Re: Automated Scheduling to Pause and Resume a Cache?

Post by tyraelmetanamede »

i developed a small tool to help with that:

https://www.romexsoftware.com/bbs2/en-u ... 38&p=13264
Post Reply