Skip to content

Random file deletion #131

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
oOZeVsOo opened this issue Jan 19, 2017 · 7 comments
Open

Random file deletion #131

oOZeVsOo opened this issue Jan 19, 2017 · 7 comments

Comments

@oOZeVsOo
Copy link

Hi,

Almost every day, files are deleted (moved to . trash) with the sentence "deleted in remote. deleting local", but nothing was deleted on the Google Drive server.

It seems to be very random and all my directories are affected. Once in a while I just have to copy the trash folder over my google drive folder in order to get my files back.

Thanks.

@cserpell
Copy link

What happens to me is that some files are deleted one day, and the next day they are retrieved again.

@rautamiekka
Copy link

If grive has a debug mode, it needs to be activated now.

@brianborchers
Copy link

brianborchers commented Jun 3, 2017

I'm having this same problem- grive reports that files have been deleted from Google Drive that are in fact present on Google Drive. It then deletes the local copy (actually moving it to trash.) One quick fix is to copy the files back from .trash into their directories. I've also discovered that if I remove .grive_state before syncing, then this no longer happens.

However, with this step of deleting .grive_state before each sync, I find that grive has now started uploading duplicate copies of files and directories to Google Drive.

@vitalif
Copy link
Owner

vitalif commented Jun 4, 2017

There is grive --verbose which prints actions that grive does...
There is also grive --dry-run which only prints actions to be done without actually performing them.
Do you see "file xxx is deleted in remote, deleting local"?
This happens when grive doesn't "see" the remote file... but it's hard to say anything without some detail.
Do these files have some non-trivial names or so?

@brianborchers
Copy link

brianborchers commented Jun 4, 2017

I did the following.

  1. Copied files from .trash back into the grive directory to restore them.

  2. Removed .grive_state.

  3. Ran grive with --verbose and --dry-run.

Grive produced 128K lines of output, nearly all of which confirmed that various files were already sync'd. It listed 7 files to upload:

sync "./books/msri/library.msri.org/books/sga/djvu/Complexe Cotangent et D�formations I.djvu" doesn't exist in server, uploading
sync "./books/msri/library.msri.org/books/sga/djvu/Complexe Cotangent et D�formations II.TIF.djvu" doesn't exist in server, uploading
sync "./books/msri/library.msri.org/books/sga/sga/1/1t_245.html" doesn't exist in server, uploading
sync "./books/msri/library.msri.org/books/sga/sga/3-2/3-2t_052.html" doesn't exist in server, uploading
sync "./books/brian-heinold/A_Practical_Introduction_to_Python_Programming_Heinold.pdf" doesn't exist in server, uploading
sync "./hankel/anderson/dzhank.f" doesn't exist in server, uploading
sync "./presentations/csdpdenver/beckstuff/sparse_logs/PENNON/r16_2.pen" doesn't exist in server, uploading

Each of these files was already present in Google Drive with identical contents.

The grive version is:

grive version 0.5.1-dev Mar 22 2017 16:09:31

I expect that if I ran grive without the --dry-run, it would upload these 7 files, creating duplicate copies in Google Drive. That's the behavior that I've been seeing.

@brianborchers
Copy link

I ran grive again with --verbose and --dry-run, and this time the list of files to be uploaded was:

sync "./books/msri/library.msri.org/books/sga/djvu/Complexe Cotangent et D�formations I.djvu" doesn't exist in server, uploading
sync "./books/msri/library.msri.org/books/sga/djvu/Complexe Cotangent et D�formations II.TIF.djvu" doesn't exist in server, uploading
sync "./books/msri/library.msri.org/books/sga/sga/6/6t_114.html" doesn't exist in server, uploading
sync "./books/msri/library.msri.org/preprints/online/1997-065.html" doesn't exist in server, uploading
sync "./books/taneja/www.mtm.ufsc.br/~taneja/MATREDE/Math4/Image1318.gif" doesn't exist in server, uploading
sync "./hankel/oldforward/fortran/dzhank.f" doesn't exist in server, uploading
sync "./presentations/csdpusc/csdpmontreal/slideshow.aux" doesn't exist in server, uploading

This list is not the same as the previous time. Again it appears that all of these files are already present in Google Drive.

@mergwyn
Copy link

mergwyn commented Oct 2, 2017

I'm seeing similar behaviour. I sync my photos from my server to Drive every hour (checking that only one sync is running at a time). My photos are organised into one folder per year. Almost every day, with no pattern that I can see, one of the folders is deleted (normally a folder, but sometimes some files) and I see messages like:

sync "/srv/media/Google Photos/1981/Image19810020.jpg" deleted in remote. deleting local
sync "/srv/media/Google Photos/1981/Image19810021.jpg" deleted in remote. deleting local
sync "/srv/media/Google Photos/1981/Image19810019.jpg" deleted in remote. deleting local

Followed an hour later by

sync "/srv/media/Google Photos/1981/Image19810021.jpg" created in remote. creating local
sync "/srv/media/Google Photos/1981/Image19810020.jpg" created in remote. creating local
sync "/srv/media/Google Photos/1981/Image19810019.jpg" created in remote. creating local

I'm pretty sure nothing is accessing these files in between.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants