Preserve Google formats when copying

I'm a little surprised that when running a simple copy the Google formats are being converted into Microsoft formats.

How can the configs be set to preserve Google formats with a standard copy command like

rclone copy config1:/folder config2:/folder

[config1]
type = drive
scope = drive.readonly
team_drive = 0ADvaluegoesherePVA
skip_checksum_gphotos = true
token = 

[config2]
type = drive
scope = drive
team_drive = 0ANvaluegoesherePVA
skip_checksum_gphotos = true
token =

Another unusual thing I see is that when using rclone ls I am shown file extensions on native google files when those are not the true file names.

user@server:~$ rclone ls config:/
       -1 File gpresentation in rclone-testing.pptx
       -1 File gsheet in rclone-testing.xlsx
       -1 File gdoc in rclone-testing.docx
       -1 File gdoc in rclone-testing.docx
       -1 Folder Level 1b/File gpresentation in >Folder Level 1b.pptx
       -1 Folder Level 1b/File gsheet in >Folder Level 1b.xlsx
       -1 Folder Level 1b/File gdoc in >Folder Level 1b.docx
       -1 Folder Level 1a/File gdoc in >Folder Level 1a.docx
       -1 Folder Level 1a/File gpresentation in >Folder Level 1a.pptx
       -1 Folder Level 1a/File gsheet in >Folder Level 1a.xlsx
       -1 Folder Level 1a/File gsheet in >Folder Level 1a.xlsx
       -1 Folder Level 1a/Folder Level 1-2a/File gsheet in >>Folder Level 1-2a.xlsx
       -1 Folder Level 1a/Folder Level 1-2a/File gdoc in >>Folder Level 1-2a.docx
       -1 Folder Level 1a/Folder Level 1-2a/File gpresentation in >>Folder Level 1-2a.pptx
       -1 Folder Level 1a/Folder Level 1-2a/File gpresentation in >>Folder Level 1-2a.pptx
       -1 Folder Level 1a/Folder Level 1-2b/File gdoc in >>Folder Level 1-2b.docx
       -1 Folder Level 1a/Folder Level 1-2b/File gpresentation in >>Folder Level 1-2b.pptx
       -1 Folder Level 1a/Folder Level 1-2b/File gsheet in >>Folder Level 1-2b.xlsx
       -1 Folder Level 1a/Folder Level 1-2b/File-1 gsheet in >>Folder Level 1-2b.xlsx
       -1 Folder Level 1a/Folder Level 1-2b/File-2 gsheet in >>Folder Level 1-2b.xlsx
       -1 Folder Level 1a/Folder Level 1-2a/Folder Level 1-2-3a/File gpresentation in >>>Folder Level 1-2-3a.pptx
       -1 Folder Level 1a/Folder Level 1-2a/Folder Level 1-2-3a/File gsheet in >>>Folder Level 1-2-3a.xlsx
       -1 Folder Level 1a/Folder Level 1-2a/Folder Level 1-2-3a/File gdoc in >>>Folder Level 1-2-3a.docx
       -1 Folder Level 1a/Folder Level 1-2a/Folder Level 1-2-3a/File gdoc in >>>Folder Level 1-2-3a.docx
       -1 Folder Level 1a/Folder Level 1-2b/Folder Level 1-2-3b/File gsheet in >>Folder Level 1-2-3b.xlsx
       -1 Folder Level 1a/Folder Level 1-2b/Folder Level 1-2-3b/File gdoc in >>Folder Level 1-2-3b.docx
       -1 Folder Level 1a/Folder Level 1-2b/Folder Level 1-2-3b/File gpresentation in >>Folder Level 1-2-3b.pptx

You deleted all the good stuff from the template.

What version are you running?
What command are you running?
Can you run a single file copy with -vv and share the log of the command.

the version is the latest beta v1.52.3

the command is in the first post
rclone copy config1:/folder config2:/folder

I tried to copy a single file but as I thought, the wrong file name has be used. I had to add .xlsx when that does not exist in the native Sheet file name.

rclone copy config1:/sheet-in-rclone-testing.xlsx config2:/
2020/08/10 10:21:30 DEBUG : rclone: Version "v1.52.3" starting with parameters ["rclone" "copy" "config1:/sheet-in-rclone-testing.xlsx" "config2:/" "-vv"]
2020/08/10 10:21:30 DEBUG : Using config file from "/home/larsen161/.config/rclone/rclone.conf"
2020/08/10 10:21:31 DEBUG : fs cache: adding new entry for parent of "config1:/sheet-in-rclone-testing.xlsx", "demo-cloudbakers-steve:"
2020/08/10 10:21:31 DEBUG : fs cache: renaming cache item "config2:/" to be canonical "config2:"
2020/08/10 10:21:31 DEBUG : sheet-in-rclone-testing.xlsx: Need to transfer - File not found at Destination
2020/08/10 10:21:32 DEBUG : Google drive root '': File to upload is small (4589 bytes), uploading instead of streaming
2020/08/10 10:21:34 DEBUG : sheet-in-rclone-testing.xlsx: MD5 = b2a11b35c118c37f97b493292da57bc4 OK
2020/08/10 10:21:34 INFO  : sheet-in-rclone-testing.xlsx: Copied (new)
2020/08/10 10:21:34 DEBUG : sheet-in-rclone-testing.xlsx: Updating size of doc after download to 4589
2020/08/10 10:21:34 INFO  : sheet-in-rclone-testing.xlsx: Copied (Rcat, new)
2020/08/10 10:21:34 INFO  : 
Transferred:        8.963k / 8.963 kBytes, 100%, 3.500 kBytes/s, ETA 0s
Transferred:            3 / 3, 100%
Elapsed time:         2.5s

2020/08/10 10:21:34 DEBUG : 6 go routines active

Without specifying --drive-server-side-across-configs, rclone will download & then upload the file. This can only be done in a couple of formats that are allowed by Google and none of them are the Google format.

More documentation about this behaviour is available at: https://rclone.org/drive/#import-export-of-google-documents

If you need to preserve the google format, you will need to add the --drive-server-side-across-configs flag so that there is no download/upload.

That's working. I just find it unusual that the default behaviour does not match what the GUI does when you copy a file which is keep the same format as the source file.

Annoyingly server side copy across configs doesn't always work. If we could rely on it, it could be the default.

@ncw are there some tickets that talk about the unreliability; what happens sometimes?

It is a permissions thing. The error Google gives back it a 404 not found error though.

I don't know exactly why sometimes it gives a 404 error.

This is in an issue - a bit of searching should find it.

It would be nice to fix this so we have across drives enabled permanently but when we get this specific error we fall back to copying by download and upload

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.