Backing up Google Docs and Google Sheets files

What is the problem you are having with rclone?

I am attempting to back up my Google Drive files to my local PC.

These file types backed up as expected:

  • .png
  • .jpg
  • .pdf

The Google Docs and Google Sheets files did not back up as expected.
The Google Docs files backed up to very small .docx files.
The Google Sheets files backed up to very small .xlsx files.
For example, here is the entire contents of banana_bread.docx:

" zip.vim version v33
" Browsing zipfile /home/wolfv/gdrive_wolfvolpi_backup/last_snapshot/wfpb_recipes/banana_bread.docx
" Select a file with cursor and press ENTER

word/numbering.xml
word/settings.xml
word/fontTable.xml
word/styles.xml
word/document.xml
word/_rels/document.xml.rels
_rels/.rels
word/theme/theme1.xml
[Content_Types].xml

How to back up Google Docs and Google Sheets files with rclone?

Run the command 'rclone version' and share the full output of the command.

rclone v1.65.2
- os/version: fedora 39 (64 bit)
- os/kernel: 6.6.13-200.fc39.x86_64 (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.21.6
- go/linking: static
- go/tags: none

Which cloud storage system are you using?

I am backing up my Google Drive to my local PC.

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone sync gdrive_wolfvolpi:/ /home/wolfv/gdrive_wolfvolpi_backup//last_snapshot --backup-dir=/home/wolfv/gdrive_wolfvolpi_backup//old_files --suffix=_2024-02-10_03.07.00 --log-file=/home/wolfv/Documents/pc_maintenance/backup_systems/rclone_wolf/rclone_jobber.log --checksum -vv

Please run 'rclone config redacted' and share the full output. If you get command not found, please make sure to update rclone.

[gdrive_wolfvolpi]
type = drive
client_id = XXX
client_secret = XXX
scope = drive.readonly
token = XXX
team_drive = 

[local_drive]
type = local
nounc = true

[onedrive]
type = onedrive
token = XXX
drive_id = XXX
drive_type = personal

[onedrive_test_rclone_backup_crypt]
type = crypt
remote = onedrive:test_rclone_backup
filename_encryption = standard
directory_name_encryption = true
password = XXX
password2 = XXX

[onedrive_wolfv_backup_crypt]
type = crypt
remote = onedrive:wolfv_backup
filename_encryption = standard
directory_name_encryption = false
password = XXX
password2 = XXX
### Double check the config for sensitive info before posting publicly

A log from the command that you were trying to run with the -vv flag

Check out the limitations of Google Docs and the API with rclone:

Google drive (rclone.org)

So now I opened the banana_bread.docx file that was backed up to my PC with various applications.
Emacs and LibreOffice Writer displayed the file as a delicious banana-bread recipe.
The "less" utility displayed the file as a large binary file:

    $ less banana_bread.docx
    "banana_bread.docx" may be a binary file.  See it anyway? 

Here is the entire contents of the same file when viewed on GVIM:

" zip.vim version v33
" Browsing zipfile /home/wolfv/gdrive_wolfvolpi_backup/last_snapshot/wfpb_recipes/banana_bread.docx
" Select a file with cursor and press ENTER

word/numbering.xml
word/settings.xml
word/fontTable.xml
word/styles.xml
word/document.xml
word/_rels/document.xml.rels
_rels/.rels
word/theme/theme1.xml
[Content_Types].xml

What is going on?
What is GVIM displaying?

A DOCX file is a ZIP archive of XML files. To view it you need program that understand this format.

From your description it looks like GVIM does not.

1 Like

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