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!


Solution 1:

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

HTH

Solution 2:

I don't believe that starting a full sync is required as mentioned by @mschanya. It appears that since Grive2 v0.4.0 partial sync is supported at the folder level with the command grive -s subdir

It also seems that since Grive2 v0.4.2 there is an option to exclude files by perl regexp with the switch --ignore arg {Perl RegExp to ignore files (matched against relative paths, remembered for next runs)}.

Github address is here

Source:http://yourcmc.ru/wiki/Grive2#Syncs