Thanks for the advices. Thanks to all that responded.
SOLVED:
What I figured out is that I can just use a batch file. It seems to be the cleanest setup for my particular use case.
For anyone that is interested in using a batch file to backup to OMV, I will explain the setup below.
STEP 1. Create the batch file. (Use notepad or Notepad++ and then change the .txt to .bat as needed and vice versa.)
(It can be located pretty much anywhere, but I would put it in a file location that you can remember.)
- I used the ROBOCOPY feature since it has the /PURGE option to keep my backup drive matching my source drive.
- - Research a little bit about batch file creation and the ROBOCOPY feature HERE: ROBOCOPY LINK
- You could probably use the XCOPY feature as and alternative, but it did not fit my use case.
- - Research its functionality HERE: XCOPY LINK
My Batch File named SYNC.bat looks like this:
@echo off
ROBOCOPY "D:" \\10.20.1.100\share\ /S /E /MT:12 /DCOPY:DAT /COPY:DAT /PURGE /R:5 /W:5
To explain what is going on, basically it is just copying from SOURCE drive D: (which is a local disk in my pc) to DESTINATION drive X: which is my OMV drive.
Since the task scheduler doesn't play nice with the syntax " X: " or " X:\ " I had to put in the IP address of my OMV Server.
NOTE: Add the function PAUSE to the last line of the batch file and open it manually to debug the batch file if needed. BUT remember to remove the PAUSE function before using it in the Task Scheduler or it will run continuously forever.
FOR DEBUGGING ONLY:
@echo off
ROBOCOPY "D:" \\10.20.1.100\share\ /S /E /MT:12 /DCOPY:DAT /COPY:DAT /PURGE /R:5 /W:5
PAUSE
/S - Copies subdirectories. This option automatically excludes empty directories.
/E - Copies subdirectories. This option automatically includes empty directories.
/MT:12 - Use 12 Threads of my PC.
/DCOPY:DAT - Specifies what to copy in directories. The valid values for this option are:
D - Data
A - Attributes
T - Time stamps
/COPY:DAT - Specifies which file properties to copy. The valid values for this option are:
D - Data
A - Attributes
T - Time stamps
/PURGE - Deletes destination files and directories that no longer exist in the source.
/R:5 - Specifies the number of retries on failed copies.
/W:5 - Specifies the wait time between retries, in seconds.
STEP 2. Add it to the Task Scheduler
Type in: "Task Scheduler" in the Windows search box. Open it.
On the far right side, Or under the Action TAB click on "Create Basic Task"
Type in a name for your Task and give it a description if you want to.
Click Next>
Set the Trigger Frequency Daily.
Click Next>
Set a Start Day and Time, Set Recurring Time to 1 Day.
Set the Action to "Start a Program"
Click Next>
Browse to the batch file location and select it.
Click Next>
Click Finish. (Open Properties if you need to make more edits.)
Its is as easy as that.
It does run a bit slow if you use certain functions such as /Z OR /B in your batch file due to logging. But that is the jist of it.
Research all the functions using the links above to see which options work best for your use case.
As always, your mileage may vary.
Good Luck!