Hi,
I'm on Windows (10, x64) and using rclone v1.50.2.
I want to sync the contents of (multiple) local folders on a local drive to another local drive.
This is the sample batch file:
@FOR /F "tokens=2 delims==" %A IN ('wmic OS Get localdatetime /value') DO SET "dt=%A"
SET "YY=%dt:~2,2%" & SET "YYYY=%dt:~0,4%" & SET "MM=%dt:~4,2%" & SET "DD=%dt:~6,2%"
SET "HH=%dt:~8,2%" & SET "NN=%dt:~10,2%" & SET "SS=%dt:~12,2%"
SET Fullstamp=%YYYY%-%MM%-%DD%_%HH%-%NN%-%SS%
SET RCLONEDIR=D:\Tools\@Command Line Tools\rclone_x64
REM Sync
SET SRC_DRIVE=D:
SET DST_DRIVE=T:
REM This is the part to repeat for each directory to backup!
SET SRC_FLDR=Install
SET SRC_PATH=%SRC_DRIVE%\%SRC_FLDR%
SET DST_PATH=%DST_DRIVE%\rclone_tst\backup\users\%USERNAME%\%SRC_FLDR%
REM %ARCHIVES% must be ONE LEVEL ABOVE of %DST_PATH%!
SET ARCHIVES=%DST_DRIVE%\rclone_tst\backup\users\%USERNAME%\!ARCHIVES_%SRC_FLDR%!\%Fullstamp%
# Copy between two local drives
rclone.exe --config "%RCLONEDIR%\.rclone.conf" sync -P --retries 1 --ignore-case --filter-from "%RCLONEDIR%\filters.txt" "%SRC_PATH%" nounc:"%DST_PATH%" --backup-dir nounc:%ARCHIVES%
So the resolved path of DST_PATH is
T:\rclone_tst\backup\users\me\Install
And the ARCHIVES path is
T:\rclone_tst\backup\users\me\!ARCHIVES_Install!\2019-12-12_15-34-14
Fine so far. rclone will create that path and move any updated files into it before it copies over the changed ones.
BUT: It will always create a new timestamped folder and DELETE any existing ones beforehand!
So I will always only have one backup and not multiple ones (until I clean them up myself).
Can I do anything against this behavior?