Files with *.gsheet or *.gdoc extensions

Not really sure where to put this. I don’t think it’s a bug per se, but just something to keep in mind.

If you have a local folder 2-way synced to Google drive, and then create documents directly within google docs, that cloud file is then synced down to the local drive but it is not the actual document, but rather a JSON file that points to the Google file ID.

Normally, that would be ok. But if you back up that local file to an external harddrive, and then delete the cloud version at some point (and from google’s trash), restoring that file from the external harddrive backup will not get your original document back.

To reproduce this:

  • Create a document directly in Google Drive in a folder that is included in InSync’s sync list. Add a bunch of random text and make sure it saves.
  • InSync will soon sync it to the local drive.
  • Open that local file in a text editor. Note the file is only a couple hundred bytes, and it does not have your random text, but is a small JSON object that contains the ID info for your file on Google drive.
  • Copy that local file to an external thumbdrive or harddrive.
  • In google or local system, delete the file. Make sure it is deleted from local trash and Google’s trash.
  • Restore the file from the external thumbdrive/harddrive backup and try to open it. It will just open in a text editor and the original “real” data is gone.

Luckily for me, there were only three documents like this, none of which were terribly important, so I was able to recreate them easily.

To ensure this does not happen to you, I recommend creating the file locally. From that point, it should automatically synced via InSync and it can then be edited in Google Docs and the local file contents will change properly too. If you do create a file directly in Google Drive, download it as a docx or xlsx file to your local PC, and then put it in a synced folder. Either method will retain the actual file contents and not just useless JSON pointer data.

Maybe InSync could be updated to automatically download the actual data via Google’s export feature when syncing the cloud to the local folder? Until then, the method I described above should work.

Also, I am running InSync on Linux Mint 22.2, so not sure if this applies to other OS’s, so YMMV.

1 Like

Hi @BrianG! Thank you so much for taking the time to share your insights and suggestions. I’ll forward this to our team.

In the meantime, you may also use Docs Conversion so you can edit the file locally via OpenDocument or MS Office: Docs Conversion | Insync Help Center.

In the event that this file is deleted in the cloud, you still have a backup copy that you can reupload. It’s not a gdoc or gsheet file anymore since you backed up the converted format (*.odt or *.docx, for example), but you won’t lose important data.

Let me know your thoughts on this!

Thank you!

I wish I had seen that setting earlier. It would have prevented the loss of a few files. I’m curious why the auto-conversion setting isn’t on by default?

Hello, @BrianG!

My apologies for the trouble you went through!

Docs Conversion and other preferences can be configured while users are setting up their Google Drive account. We outline this on Step 5 here: Setup Guide for Google Drive accounts | Insync Help Center

It’s not enabled by default since users may prefer one format over the other. I hope this clarifies things further!

How do you enable docs conversion with insync headless?

Yeah, I guess it’s my fault for not fully reading the manual. :blush:

Although, I would personally have preferred the app just pick a conversion format and make the feature enabled by default. If the user wants the other format, it can be changed, and documents incorrectly can be converted to the desired format easily enough. However, if left disabled (such as in my case), it could result in data loss. Having the app make an incorrect assumption on the specific conversion format is much better than losing data IMO; essentially, erring on the side of caution.

Sorry, I am not running headless, but it seems something like this is a good place to start:

insync-headless config -list

From Google Drive and OneDrive on Linux Servers - Insync

Not so much a question for you, as for Insync support:

$ insync-headless config -l
run_on_startup: True
allow_analytics: True

I tried selective-sync too, since some account-level settings are accessible only from there, but I didn’t see an option for docs conversion there either.

This makes total sense! Thank you so much for the feedback, @BrianG. I’ll make sure this is considered when we work on future improvements for Docs Conversion.

Hi @dlo! You may refer to export-option as shown here: Insync 3 Headless: Getting started | Insync Help Center