Copy errors when backing up google docs from google drive

When backing up my google drive account to another cloud based account I get errors with google documents when syncing using the default rclone google drive settings. The errors all say something like “Failed to copy: read 55549 bytes expecting 55554”. The errors seem to occur only for specific google documents and while the documents copy to the destination fine on the 1st sync, any subsequent syncs result in recopying those docs even though they didn’t change & then the failures occur. Any idea why this is happening?

I’m also having this happen. With me I’m requesting odt and ods documents from google drive formats.

I’m guessing that the Content-Length (equivalent) property is returning some byte length, but it is reading a different length. Thus I would assume this is some oddity / bug on google drive. I have nothing concrete though.

This happens when rclone asks drive for the content length using a HEAD request, but when the doc comes down it is a different size.

I haven’t found a work-around for this. You can use --ignore-size which is a little unsatisfactory but OK if you’ve got lots of docs to download.

Or you can just live with rclone having to do a few retries.

I’ve written this in the drive docs…

Google docs downloads sometimes fail with “Failed to copy: read X bytes expecting Y”

This is the same problem as above. Google reports the google doc is
one size, but rclone downloads a different size. Work-around with the
--ignore-size flag or wait for rclone to retry the download which it
will.

Unfortunately the workaround I’m currently using is to take all google docs that repeatedly fail to copy & convert them to a file in open doc format & replace the google doc with the file. I have 100’s of google docs & only had to convert about 8 of them to a file. Not exactly ideal but I don’t see another reasonable choice cuz I don’t want to use the --ignore-size flag.

Couldn’t you exclude the Google docs firstly and then just have a second command run after the first to only sync those with the ignore size option so that only affects the docs themselves?

Thanks, that makes a lot of sense. I’ll implement that instead.

1 Like

This is what I was trying to implement but I’m stuck with the second command bit quoted here:

second command run after the first to only sync those with the ignore size option so that only affects the docs themselves?

How do I just apply the second command only to google docs?

I believe you have to exclude them by extension. i.e. “docx,xlsx,pptx,svg”