Using NSSM to create a rclone sync service that would copy in real time (and update any changes) files from a destination to a source, both on the same machine, but on different physical disks.
The issue is that service runs once as I start it, and then it throws an error
"Windows could not start the service on Local Computer The service did not return an error. This could be an inernal Windows error or an internal service error. If the problem persists, contact your system administrator."
And then it goes in paused mode. Every time I try to resume it, would do one syncing operation and return back to paused state. There was one way in which I managed to keep it running, with the -i flag, but that does nothing, even if I also add the --auto-confirm flag.
From my research, this happens when the script terminates almost instantly. And the fact that it starts and runs when using the -i flag confirms it.
- os/version: Microsoft Windows 10 Pro N 2009 (64 bit)
- os/kernel: 10.0.19044.1526 (x86_64)
- os/type: windows
- os/arch: amd64
- go/version: go1.17.2
- go/linking: dynamic
- go/tags: cmount
Local machine, a different physical drive.
sync --no-console "R:\Critical_To_Keep" rclone_ramdisk:"F:\__BKP\Critical_To_Keep"
[rclone_ramdisk] type = local
Not relevant at this stage.
I need a solution to keep the service running, so it won't enter pause mode and it will instantly copy new files or replace modified files from the source to the destination on the go.
Also, as a bonus, it would be ideal if I could make the app to also remove the files a the destination that are no longer present at source. I looked over the
check command with
--missing-on-src flag and i could output in a text file the full paths of the files that matched the filter. However, I wouldn't know how to use this in an elegant manner for my purpose.
I have basic scripting skills, but nothing that could help me produce a vba or bat file complex enough for this kind of task.
Any help appreciated.