I'm having issues trying to use rclone to make regular backups of my google drive. Specifically, I would like to make local copies of online gsuite documents (e.g. gdoc > .docx), and only download the new docs whenever the gdoc changes.
When I try using sync, unchanged files that were previously downloaded still get re-downloaded. Specifically, this is happening with native google files (gdoc, gsheet, gslide, etc). Uploaded PDFs and images sync fine. It seems like the reason is because rclone thinks modifications times for the gsuite files differ. Here is an example of a gdoc called testdoc that gets downloaded every time I run sync.
2021/02/19 16:47:30 DEBUG : rclone: Version "v1.51.0" starting with parameters ["rclone" "--config" "/Users/dan/Source/gbackup/.rcloneconf" "sync" "--fast-list" "--progress" "-vv" "gdrive:Test" "/Volumes/Data/test" "--backup-dir=/Volumes/Data/archive/2021/2021-02-19T16-47-30"]
2021-02-19 16:47:35 INFO : Local file system at /Volumes/Data/test: Waiting for checks to finish
2021-02-19 16:47:35 DEBUG : testdoc.docx: Modification times differ by -1.666s: 2021-02-19 21:42:50.826 +0000 UTC, 2021-02-19 16:42:49.16 -0500 EST
2021-02-19 16:47:35 INFO : testdoc.docx: Moved (server side)
2021-02-19 16:47:35 INFO : Local file system at /Volumes/Data/test: Waiting for transfers to finish
2021-02-19 16:47:35 DEBUG : Local file system at /Volumes/Data/test: File to upload is small (6122 bytes), uploading instead of streaming
2021-02-19 16:47:35 DEBUG : testdoc.docx: MD5 = 7cc3dd2e8d9652b1ed588fc122c5e282 OK
2021-02-19 16:47:35 INFO : testdoc.docx: Copied (new)
2021-02-19 16:47:35 DEBUG : testdoc.docx: Updating size of doc after download to 6122
2021-02-19 16:47:35 INFO : testdoc.docx: Copied (Rcat, new)
I've tried to compensate for this by using --checksum
. When I make changes to the gdoc (add a new line of test), the checksums stop matching, but the size is reported as the same, so it doesn't sync
2021/02/19 16:51:13 DEBUG : rclone: Version "v1.51.0" starting with parameters ["rclone" "--config" "/Users/dan/Source/gbackup/.rcloneconf" "sync" "--fast-list" "--checksum" "--progress" "-vv" "gdrive:Test" "/Volumes/Data/test" "--backup-dir=/Volumes/Data/archive/2021/2021-02-19T16-51-13"]
2021/02/19 16:51:13 DEBUG : Using config file from "/Users/dan/Source/gbackup/.rcloneconf"
2021-02-19 16:51:14 INFO : Local file system at /Volumes/Data/test: Waiting for checks to finish
2021-02-19 16:51:14 NOTICE: Local file system at /Volumes/Data/test: --checksum is in use but the source and destination have no hashes in common; falling back to --size-only
2021-02-19 16:51:14 DEBUG : testdoc.docx: Size of src and dst objects identical
2021-02-19 16:51:14 DEBUG : testdoc.docx: Unchanged skipping
I've read that google is flakey about reporting file size changes, which could be why I was not seeing the file size update. But the checksum seemed reliable. I read that you can add --ignore-size
to force just looking at checksum. I tried this, but rclone still checked the file size anyway?
2021/02/19 16:55:30 DEBUG : rclone: Version "v1.51.0" starting with parameters ["rclone" "--config" "/Users/dan/Source/gbackup/.rcloneconf" "sync" "--fast-list" "--checksum" "--ignore-size" "--progress" "-vv" "gdrive:Test" "/Volumes/Data/test" "--backup-dir=/Volumes/Data/archive/2021/2021-02-19T16-55-30"]
2021/02/19 16:55:30 DEBUG : Using config file from "/Users/dan/Source/gbackup/.rcloneconf"
2021-02-19 16:55:31 INFO : Local file system at /Volumes/Data/test: Waiting for checks to finish
2021-02-19 16:55:31 NOTICE: Local file system at /Volumes/Data/test: --checksum is in use but the source and destination have no hashes in common; falling back to --size-only
2021-02-19 16:55:31 DEBUG : testdoc.docx: Size of src and dst objects identical
2021-02-19 16:55:31 DEBUG : testdoc.docx: Unchanged skipping
I'm using
- rclone version v1.51.0
- macOS 10.15.7 (intel) (darwin/amd64)
- go version: go1.14
Looking for advice! Thanks!