Ubuntu – How to do partial sync in grive (grive2)


Grive2, which presents as grive version 0.4.0-1 seems to be working using the ppa from webupd8. Supposedly it can now do partial/selective sync. (see Is there a Google Drive client available?)

But something that is not revealed in the manpage is how to do this, other than using the -s switch and manually syncing individual folders. I remember reading about a .exclude file where supposedly you list the files you want ignored in a sync, but this is cumbersome to maintain, especially if you have a Google Drive as big as mine.

Does anyone know how to format .exclude, and if it can use wildcards, e.g. something like this:

\# Exclude the following:
/My Drive/Photos/big/*
./Google Photos/*.jpg

Edit: Just got a reply from the developer on GitHub, who says there is no .exclude file, but he is working on something like this. Now I am doubly confused because I don't know where I read about it, but I know I'm not dreaming!

Best Answer

Also interested & accidentally found a workaround, steps:

  1. install grive2
  2. authenticate and start full sync by grive -a in the ~/grive folder
  3. wait till files in Google Drive root folder will be downloaded and break it when syncing first subfolder
  4. create new subfolder such as ~/grive/myfiles and put some files here
  5. start single folder sync by grive -s ~/grive/myfiles
  6. repeat step 5 when you want to sync changes in myfiles folder


Related Question