rclone: The `–refresh-times` option doesn’t seem to work for an encrypted onedrive remote
The associated forum post URL from https://forum.rclone.org
What is the problem you are having with rclone?
The --refresh-times option doesn’t seem to work for my encrypted onedrive remote.
This is a follow on from my bug report and subsequent issue #8090. I reopened the issue but it didn’t get visibility
If I sync a single file and then an lsl of the remote file, I can see that it still only has one-second resolution, not millisecond resolution. A subsequent run of sync still reports that it has to adjust the modification time. That is, it appears --refresh-times is not working.
What is your rclone version (output from rclone version)
rclone v1.68.0
- os/version: ubuntu 22.04 (64 bit)
- os/kernel: 5.15.0-101-generic (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.23.1
- go/linking: static
- go/tags: none
Which OS you are using and how many bits (e.g. Windows 7, 64 bit)
Ubuntu 22.04.2 LTS
Which cloud storage system are you using? (e.g. Google Drive)
Encrypted OneDrive
The command you were trying to run (e.g. rclone copy /tmp remote:tmp)
rclone -vv sync --refresh-times ~/repos/photos/data/1/1202 onedrive:repos/photos/data/1
Then
rclone lsl ~/repos/photos/data/1/1202
rclone lsl onedrive:repos/photos/data/1/1202
A log from the command with the -vv flag (e.g. output from rclone -vv copy /tmp remote:tmp)
borg@host:~$ rclone -vv sync --refresh-times ~/repos/photos/data/1/1202 onedrive:repos/photos/data/1
2024/09/22 23:57:32 DEBUG : rclone: Version "v1.68.0" starting with parameters ["rclone" "-vv" "sync" "--refresh-times" "/home/borg/repos/photos/data/1/1202" "onedrive:repos/pho
tos/data/1"]
2024/09/22 23:57:32 DEBUG : Creating backend with remote "/home/borg/repos/photos/data/1/1202"
2024/09/22 23:57:32 DEBUG : Using config file from "/home/borg/.config/rclone/rclone.conf"
2024/09/22 23:57:32 DEBUG : fs cache: adding new entry for parent of "/home/borg/repos/photos/data/1/1202", "/home/borg/repos/photos/data/1"
2024/09/22 23:57:32 DEBUG : Creating backend with remote "onedrive:repos/photos/data/1"
2024/09/22 23:57:32 DEBUG : Creating backend with remote "onedriveunderlying:rclonebackups/qtvah5opb18p4g4ve2i0lh4mio/vptothej6ciusdjpca3agsgj5o/u58r1pkbe9ip1vlcarj5tntqqs/s4s1q07jvge4ij8b60qlddrsf8"
2024/09/22 23:57:34 DEBUG : 1202: Modification times differ by -143.88454ms: 2023-02-17 21:00:17.14388454 +1100 AEDT, 2023-02-17 10:00:17 +0000 UTC
2024/09/22 23:57:35 INFO : 1202: Updated modification time in destination
2024/09/22 23:57:35 DEBUG : 1202: Unchanged skipping
2024/09/22 23:57:35 INFO :
Transferred: 0 B / 0 B, -, 0 B/s, ETA -
Elapsed time: 2.9s
2024/09/22 23:57:35 DEBUG : 6 go routines active
borg@host:~$ rclone lsl ~/repos/photos/data/1/1202
147857 2023-02-17 21:00:17.143884540 1202
borg@host:~$ rclone lsl onedrive:repos/photos/data/1/1202
147857 2023-02-17 21:00:17.000000000 1202
The key part appears to be that the mtime of the onedrive file still only has precision to a whole second.
How to use GitHub
- Please use the 👍 reaction to show that you are affected by the same issue.
- Please don’t comment if you have no relevant information to add. It’s just extra noise for everyone subscribed to this issue.
- Subscribe to receive notifications on status change and new comments.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Reactions: 4
- Comments: 24 (15 by maintainers)
Commits related to this issue
- onedrive: fix time precision for OneDrive personal This reduces the precision advertised by the backend from 1ms to 1s for OneDrive personal accounts. The precision was set to 1ms as part of: 1473d... — committed to rclone/rclone by ncw 2 years ago
- onedrive: fix time precision for OneDrive personal This reduces the precision advertised by the backend from 1ms to 1s for OneDrive personal accounts. The precision was set to 1ms as part of: 1473d... — committed to dreamoeu/rclone by ncw 2 years ago
I have had the same issue and adding
--modify-window 1ssolved it - and I forgot about it. The problem was crazy as not all files were re-synced in my rclone union. I had no time to investigate especially that solution existed.When reading this thread I looked closer at different OneDrive accounts I have and noticed that at least their GUI differs. For example:
These two accounts were created on the same day few months ago - still it looks like they use different OneDrive software:) If GUI differs then API can differ too:)
Thanks for your observations @kapitainsky and your testing @sweharris
I’ve merged this to master now which means it will be in the latest beta in 15-30 minutes and released in v1.69 and I’ll put it in 1.68.2 if we make one of those.
I’ll be unable to check this for a couple of weeks, but thank you