Syncing Google Drive to BackBlaze .- Help with command for Docs

Hello.

I’ve been on a journey to try and sync my google photos and google docs to backblaze. I’ve overcome the hurdle of duplicate file names. However, one issue that I couldn’t sort out was that when copying google docs to backblaze, for whatever reason it saw the file sizes as different so would always recopy it.

I saw a solution online that involved doing a sync and ignoring the google docs, then syncing the google docs but ignoring the file size.

This is how far I got:

DeDuplicate Gdrive

rclone dedupe --dedupe-mode rename gdrive:Photos
rclone dedupe --dedupe-mode rename gdrive:Documents

Sync Files

rclone sync gdrive:Photos backblaze:Files/Photos --copy-links
rclone sync gdrive:Documents backblaze:Files/Documents --copy-links --drive-skip-gdocs

Now what do I need to do to get my google docs synced to backblaze, without it kicking up a fuss that the file size on the destination is different to the source, even though they are the same files?

I haven’t found a good solution for this. rclone asks google drive for the size of the document and it gives different answers from run to run!

You can try the --ignore-size flag I think that will probably do what you want.

Hi NCW. Thank you for the reply. Is there a way to apply this only to google drive files? Something like --google_format flag, so it applys to only google sheet, google doc etc

I was thinking something like this

rclone sync … --ignore-size --include “*.jpg”

But from here it doesn’t seem like google will tell me what the file format is:
https://groups.google.com/forum/#!msg/google-documents-list-api/iDBqp-wO6oM/ZGP0tXPC43kJ

So I don’t know how to apply the --ignore-size option only to the google native formats like google doc or google sheet

That is the problem is that you can’t download the google native docs, you can only export them. So rclone will always export the docs with one of the extensions listed in

  --drive-formats string              Comma separated list of preferred formats for downloading Google docs. (default "docx,xlsx,pptx,svg")

So there is your list of google drive formats!

Thank you very much! Will do

I’m sorry to bring this up. But how do I only backup google documents.

With this new command to ignore the size, would I just have to run that over all files again, in which case it would skip them because they exist, or can I do something along these lines in sudo code:

if document=googledoc,
then rclone sync XYZ --ignore-size

Something like rclone sync --ignore-size --include '*.{docx,xlsx,pptx,svg}' ... should do it

1 Like