What is the problem you are having with rclone?
The rclone copy command that I am using should compare source and destination files and only copy updated or new files, within the specified time window, from the source to the destination. However, there are a few files which rclone repeatedly copies on every single run even though they have not been modified. To note this is only happening with two files within a specific directory out of several thousand files in each run. The behaviour with respect to the remaining files is as expected. The debug information given below focuses in on the bug and demonstrates it - it does not include the thousands of other files mentioned above.
Run the command 'rclone version' and share the full output of the command.
rclone v1.57.0
- os/version: Microsoft Windows 10 Pro 2009 (64 bit)
- os/kernel: 10.0.19043.1466 (x86_64)
- os/type: windows
- os/arch: amd64
- go/version: go1.17.2
- go/linking: dynamic
- go/tags: cmount
Which cloud storage system are you using? (eg Google Drive)
Microsoft OneDrive - Business Account
The command you were trying to run (eg rclone copy /tmp remote:tmp
)
rclone copy "%sourcepath%" "%destpath%" --max-age 14d --min-age 60m --no-traverse --drive-chunk-size 64M --checkers 7 --retries 1 --stats 10m --backup-dir="%archivepath%\%date%" --log-file="%logfilepath%\%logfilename%" --log-level=DEBUG
The rclone config contents with secrets removed.
[WitsOneDrive]
type = onedrive
drive_type = business
link_scope = organization
A log from the command with the -vv
flag
There are three files in the directory which is being copied to OneDrive:
The following behaviour is expected with regard to these files, given that they do not exist at the destination, and that they are not modified:
-
default.html
should be copied on the first run and skipped subsequently -
strict.sty
should be excluded as it falls outside the time window -
test.log
should be copied on the first run and skipped subsequently
What is actually happening is as follows:
-
default.html
is always copied as a new file to the destination -
strict.sty
is correctly excluded -
test.log
is always copied as a new file to the destination
(As mentioned above, this example hones in on the bug. In my normal run, there are hundreds to thousands of other files which fall within the time window but have not been modified since the previous run and so are skipped as unchanged.)
Below are log files from two consecutive runs.
At this point, none of the files exist at the destination:
2022/02/18 10:27:00 DEBUG : --min-age 1h0m0s to 2022-02-18 09:27:00.7422054 +0200 SAST m=-3599.930229499
2022/02/18 10:27:00 DEBUG : --max-age 2w to 2022-02-04 10:27:00.7422054 +0200 SAST m=-1209599.930229499
2022/02/18 10:27:00 DEBUG : rclone: Version "v1.57.0" starting with parameters ["c:\\Program Files\\rclone/\\rclone" "copy" "c:/Data/WitsEIE/Ethics/ethics-www/_layouts/" "WitsOneDrive:/Elixir/Ethics/ethics-www/_layouts/" "--max-age" "14d" "--min-age" "60m" "--no-traverse" "--drive-chunk-size" "64M" "--checkers" "7" "--retries" "1" "--stats" "10m" "--backup-dir=WitsOneDrive:/Elixir-Archive\\2022.02.18-10.27" "--log-file=c:\\Data\\Config\\Scripts\\rclone-logs\\2022.02.18-10.27-rclone-copy-bug.log" "--log-level=DEBUG"]
2022/02/18 10:27:00 DEBUG : Creating backend with remote "c:/Data/WitsEIE/Ethics/ethics-www/_layouts/"
2022/02/18 10:27:00 DEBUG : Using config file from "C:\\Users\\Steve\\AppData\\Roaming\\rclone\\rclone.conf"
2022/02/18 10:27:00 DEBUG : fs cache: renaming cache item "c:/Data/WitsEIE/Ethics/ethics-www/_layouts/" to be canonical "//?/c:/Data/WitsEIE/Ethics/ethics-www/_layouts/"
2022/02/18 10:27:00 DEBUG : Creating backend with remote "WitsOneDrive:/Elixir/Ethics/ethics-www/_layouts/"
2022/02/18 10:27:05 DEBUG : fs cache: renaming cache item "WitsOneDrive:/Elixir/Ethics/ethics-www/_layouts/" to be canonical "WitsOneDrive:Elixir/Ethics/ethics-www/_layouts"
2022/02/18 10:27:05 DEBUG : Creating backend with remote "WitsOneDrive:/Elixir-Archive\\2022.02.18-10.27"
2022/02/18 10:27:10 DEBUG : fs cache: renaming cache item "WitsOneDrive:/Elixir-Archive\\2022.02.18-10.27" to be canonical "WitsOneDrive:Elixir-Archive/2022.02.18-10.27"
2022/02/18 10:27:10 DEBUG : strict.sty: Excluded
2022/02/18 10:27:13 DEBUG : One drive root 'Elixir/Ethics/ethics-www/_layouts': Waiting for checks to finish
2022/02/18 10:27:13 DEBUG : One drive root 'Elixir/Ethics/ethics-www/_layouts': Waiting for transfers to finish
2022/02/18 10:27:19 DEBUG : test.log: Starting multipart upload
2022/02/18 10:27:19 DEBUG : default.html: Starting multipart upload
2022/02/18 10:27:21 DEBUG : default.html: Uploading segment 0/2155 size 2155
2022/02/18 10:27:21 DEBUG : test.log: Uploading segment 0/1407 size 1407
2022/02/18 10:27:22 DEBUG : test.log: quickxor = 09c46f0cc87bbbb902f696b71d705afa7b68e6c6 OK
2022/02/18 10:27:22 INFO : test.log: Copied (new)
2022/02/18 10:27:22 DEBUG : default.html: quickxor = 51d9a00ad3694d0b77284b2f9d4e21d0b7cdddbb OK
2022/02/18 10:27:22 INFO : default.html: Copied (new)
2022/02/18 10:27:22 INFO :
Transferred: 3.479 KiB / 3.479 KiB, 100%, 393 B/s, ETA 0s
Transferred: 2 / 2, 100%
Elapsed time: 22.0s
2022/02/18 10:27:22 DEBUG : 8 go routines active
The destination now looks like this:
Running the same rclone copy command again:
2022/02/18 10:30:46 DEBUG : --min-age 1h0m0s to 2022-02-18 09:30:46.5675822 +0200 SAST m=-3599.926963699
2022/02/18 10:30:46 DEBUG : --max-age 2w to 2022-02-04 10:30:46.5675822 +0200 SAST m=-1209599.926963699
2022/02/18 10:30:46 DEBUG : rclone: Version "v1.57.0" starting with parameters ["c:\\Program Files\\rclone/\\rclone" "copy" "c:/Data/WitsEIE/Ethics/ethics-www/_layouts/" "WitsOneDrive:/Elixir/Ethics/ethics-www/_layouts/" "--max-age" "14d" "--min-age" "60m" "--no-traverse" "--drive-chunk-size" "64M" "--checkers" "7" "--retries" "1" "--stats" "10m" "--backup-dir=WitsOneDrive:/Elixir-Archive\\2022.02.18-10.30" "--log-file=c:\\Data\\Config\\Scripts\\rclone-logs\\2022.02.18-10.30-rclone-copy-bug.log" "--log-level=DEBUG"]
2022/02/18 10:30:46 DEBUG : Creating backend with remote "c:/Data/WitsEIE/Ethics/ethics-www/_layouts/"
2022/02/18 10:30:46 DEBUG : Using config file from "C:\\Users\\Steve\\AppData\\Roaming\\rclone\\rclone.conf"
2022/02/18 10:30:46 DEBUG : fs cache: renaming cache item "c:/Data/WitsEIE/Ethics/ethics-www/_layouts/" to be canonical "//?/c:/Data/WitsEIE/Ethics/ethics-www/_layouts/"
2022/02/18 10:30:46 DEBUG : Creating backend with remote "WitsOneDrive:/Elixir/Ethics/ethics-www/_layouts/"
2022/02/18 10:30:46 DEBUG : One drive root 'Elixir/Ethics/ethics-www/_layouts': Token expired but no uploads in progress - doing nothing
2022/02/18 10:30:46 DEBUG : WitsOneDrive: Loaded invalid token from config file - ignoring
2022/02/18 10:30:47 DEBUG : Saving config "token" in section "WitsOneDrive" of the config file
2022/02/18 10:30:47 DEBUG : Keeping previous permissions for config file: -rw-rw-rw-
2022/02/18 10:30:47 DEBUG : WitsOneDrive: Saved new token in config file
2022/02/18 10:30:52 DEBUG : fs cache: renaming cache item "WitsOneDrive:/Elixir/Ethics/ethics-www/_layouts/" to be canonical "WitsOneDrive:Elixir/Ethics/ethics-www/_layouts"
2022/02/18 10:30:52 DEBUG : Creating backend with remote "WitsOneDrive:/Elixir-Archive\\2022.02.18-10.30"
2022/02/18 10:30:58 DEBUG : fs cache: renaming cache item "WitsOneDrive:/Elixir-Archive\\2022.02.18-10.30" to be canonical "WitsOneDrive:Elixir-Archive/2022.02.18-10.30"
2022/02/18 10:30:58 DEBUG : strict.sty: Excluded
2022/02/18 10:31:01 DEBUG : One drive root 'Elixir/Ethics/ethics-www/_layouts': Waiting for checks to finish
2022/02/18 10:31:01 DEBUG : One drive root 'Elixir/Ethics/ethics-www/_layouts': Waiting for transfers to finish
2022/02/18 10:31:01 DEBUG : test.log: Starting multipart upload
2022/02/18 10:31:01 DEBUG : default.html: Starting multipart upload
2022/02/18 10:31:02 DEBUG : test.log: Uploading segment 0/1407 size 1407
2022/02/18 10:31:02 DEBUG : default.html: Uploading segment 0/2155 size 2155
2022/02/18 10:31:05 DEBUG : default.html: quickxor = 51d9a00ad3694d0b77284b2f9d4e21d0b7cdddbb OK
2022/02/18 10:31:05 INFO : default.html: Copied (new)
2022/02/18 10:31:05 DEBUG : test.log: quickxor = 09c46f0cc87bbbb902f696b71d705afa7b68e6c6 OK
2022/02/18 10:31:05 INFO : test.log: Copied (new)
2022/02/18 10:31:05 INFO :
Transferred: 3.479 KiB / 3.479 KiB, 100%, 894 B/s, ETA 0s
Transferred: 2 / 2, 100%
Elapsed time: 19.4s
2022/02/18 10:31:05 DEBUG : 13 go routines active