I have a Windows 7 desktop and a Linux server running SSH and Samba services.
The Windows machine has a directory of files that need to be synced with a copy on the Linux server.
The Windows machine has a service that uses this set of files when running, and I need to copy the files before this service is running to ensure the integrity of the copied files.
The files are big (hundreds of MB) and ideally I'd like to use rsync to make this process efficient. I believe I can do this with cygwin.
So is there a way to make a script (I'm guessing a BAT file) that is run as an particular user, but before another particular service (e.g. on the machine turning on, but after networking is established) and rsyncs the data to either the server's samba share or (better) over ssh.
It would be fairly easy in a Linux environment, but I'm not a Windows expert.
Set the service to manual start. In the same script that you run to copy the files, start the service. This script can be run by the task scheduler as any user.