How to Do Partial Sync in Grive (Grive2)

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!

1

2 Answers

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

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:

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Alexander Ross
Author

Alexander Ross

Alexander Ross has covered the video game industry for a decade, writing deep dives on game design, esports tournaments, VR developments, and gaming culture.