Google Drive not syncing deletions to cloud

Discuss new features and functions
Posts: 5
Joined: 1 Dec 2023

rich1000

I use FreeFileSync to sync a directory with a directory within Google Drive for Desktop.
When I delete a directory or file in the local directory and then use FreeFileSync to sync the local directory with the directory within Google Drive for Desktop:
- The file/directory is deleted in the local storage associated with Google Drive for Desktop.
- The deletion does not propagate to the Google Drive in the cloud. The deleted file/directory still exists on the cloud drive even though it is removed in the local directory associated with Google Drive for Desktop.

When I use the File Manager to delete a directory in the local directory associated with Google Drive for Desktop, it does propagate the deletion to Google Drive in the cloud. Therefore, there is some difference with how FreeFileSync deletes files/directories that relates to the failure to sync the deletion to Google Drive in the cloud.
User avatar
Posts: 4074
Joined: 11 Jun 2019

xCSxXenon

FFS uses the native Windows API to work, so deletions within FFS should be identical, as far as I know. Why not just sync against the Google Drive directly though?
Posts: 5
Joined: 1 Dec 2023

rich1000

It isn't identical so question is why. Google Drive for Desktop must not key off of the Windows API when a file is deleted. There is likely an extra step that could be implemented as like I said it does work when the File Manager deletes a file.
The use I have is like a document repository were the Google Drive is the cloud repository and I sync with it and the local drive using FFS. I do not want to use the Google Drive directly when I am editing files as I want to control manually when a set of documents are uploaded to the repository (Google Drive).
The workaround if FFS just does not work with Google Drive on deletions is to leave FFS and use Git instead with GD as the Git repository.
Lmk if someone actually knows how to get FFS to work with Google Drive - including deleting files/directories with FFS and having the deletions sync to the GD cloud.
Posts: 6
Joined: 8 Dec 2023

robrob

I have a similar Issue.
viewtopic.php?p=41765#p41765
I received error messages, which I ignored. I think that's probably the reason for the Browser Google Drive not deleting the files which were deleted on my desktop drive (the error message says sth about not being able to create a RecycleBin)...
Posts: 24
Joined: 30 Oct 2023

Flowers4

Hi,

If I understand correctly, you are synchronizing your Google drive files down to your PC and then synchronizing those files from the default directory to another directory. Then, you are editing files in that alternate directory and then trying to synchronize them back to the default Google Drive directory and it's not working as you expect it to?

It's possible that what you're trying to do may simply just not work.

If you are concerned about your cloud files I recommend doing what I do which is a weekly full backup of the entire Google drive to a local SSD.

Because my Google Drive is large I choose not to synchronize the entire cloud drive down to my PC I choose to use the streaming option instead which allows you to select individual folders to remain persistently on the local computer. This is my recommendation.

I would simply use Google Desktop for Windows as Google intended for it to be used and not worry. If a file gets accidentally deleted you can restore it from your local backup.

I'm not certain but you might be able to take advantage of document or file history so that if a file gets saved you can log into your Google Drive and restore it to the most recently used file. Give that a try also. I think it saves edits for 30 days.
Posts: 1
Joined: 26 Jun 2024

dcwalker

Has the OP found a solution to this?
Posts: 5
Joined: 1 Dec 2023

rich1000

I have not found any solution. What I do now is use FreeFileSync to compare and then make deletions in the Google Drive through Windows Explorer. Then I use FFS to sync the rest.
I assume FFS is using different underlying system calls than the Windows Explorer.
I use Google Drive in streaming mode. Google states they only support file operations against the local mirrored/streamed drive through Windows Explorer.
It would be great if FFS would figure out what they do differently than Explorer for deleting files.
Posts: 2
Joined: 29 Apr 2018

tonywid

I can confirm that problem.
My config is the same as above:
Cloud Google Drive <=sync with google driver=> local folder for Google Drive (Windows) <=sync with FFS=> local work folder

case 1
file1 is deleted from local work folder
FFS sync deletes the file from local folder for Google Drive
Google Drive for Windows does not recognize this delete and does nothing

case 2
file2 is deleted from local work folder
I delete file2 manually from local folder for Google Drive
Google Drive for Windows sync deletes the file from the Cloud Google drive.

Same occurs for folders.

Hope there is a solution in FFS.
For example: Workaround: generate a bat file that deletes the files and folders.
del "G:\Meine Ablage\mygoogledata\wddel1.txt"
that worked.
Posts: 5
Joined: 1 Dec 2023

rich1000

Thanks for such a thorough analysis of the problem. FFS definitely is deleting files with a different api than the Windows Explorer. Google Drive only supports whatever Explorer is doing so it'd be great if FFS figured it out and deleted files the same way.
Until then, I am manually deleting files. I do a FFS Compare and then manually delete what it shows for removal.
Posts: 3
Joined: 14 Sep 2024

teffers

Hi Rich, I've joined the forum to reply to your post, I think I have a solution:

Had the same issue you were experiencing with the Google drive web not deleting files, even though they were being deleted on the local drive.

In the Synchronisation settings (Gear Icon), section Delete and overwrite: I changed it from Recycle bin to Permanent. Then ran the Mirror sync and it 'appears to have deleted it on the web interface.

Will do some more testing but I think it works.

UPDATE: Done a bunch more testing and it seems to be deleting from the web version perfectly now it's set to Permenantly delete and skip the Recycle bin.
Posts: 5
Joined: 1 Dec 2023

rich1000

Great. This looks resolved with teffers' 9/14/2024 post. Thank you
Posts: 3
Joined: 14 Sep 2024

teffers

Great. This looks resolved with teffers' 9/14/2024 post. Thank you rich1000, 15 Sep 2024, 21:35
No problem :-)

It had been annoying me for a while so I'm glad we found a solution.
User avatar
Posts: 4074
Joined: 11 Jun 2019

xCSxXenon

@Zenju There's developments! Maybe this info can help you if you were interested in looking into this?
Posts: 2
Joined: 30 Nov 2024

henkvdb

Oops. I recovered some braincells 😇 : I was looking for the options in Google Drive, then realizing these were FreeFileSync settings.


I have the same problem. I run FreeFileSync to mirror my 'MyCode' folder several times a day for months and now that I moving from desktop to laptop decided "OK, just copy the MyCode folder from Google drive.
On my desktop Explorer shows 284 files for 3.07mb. In my newly copied MyCode folder on my laptop I now have 1251 files of 382mb, mostly old stuff. Using the Google Drive browser function I also see those old, deleted files.
I tried using your directions above, but I can't find the "Delete and overwrite" settings you mention. I tried from my desktop using Google Drive System Area icon, tried the Browser, no luck.
Thoughts?


(I also have one TB of photos on Google Drive where I likely have the same problem. Will worry about that later)
Posts: 3
Joined: 14 Sep 2024

teffers

Oops. I recovered some braincells 😇 : I was looking for the options in Google Drive, then realizing these were FreeFileSync settings.
henkvdb, 30 Nov 2024, 04:20
You managed to sort it ?
Posts: 2
Joined: 30 Nov 2024

henkvdb

Yes, and after a few new runs things look good.
I did not bother to cleanup the bad folder on Google Drive, I just deleted it and then ran Freefilesync again. With a 3mb folder that's easy.
As far as my one TB backup of photo images: that's my final paranoia offsite backup (4th-level) so I'll worry about it if ever I need it for recovery.

Note to myself: next time a new version of Freefilesync shows up I'll make a new contribution. This is a great piece of software.