Skip to content
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

Sync only 1 folder and remember to ignore the rest of the folders #83

Open
BeUseful opened this issue Jul 9, 2016 · 4 comments
Open

Comments

@BeUseful
Copy link

BeUseful commented Jul 9, 2016

Real sorry, I know docs are written about this, but after trying multiple different ways to configure grive, I think its a bug, or maybe my command is wrong?

I have:
./dir1
./dir2
./dir3

Only want to sync dir1 and have grive ignore the rest (dir2 and dir3) permanently,
So I did grive --ignore -s '^(?\!dir1$) using perl regexp syntax, which is shown in .grive_state.

However after testing by running grive, sub-directories of dir2/test1 and dir3/test34 start to be "..creating local" when the only folder that should syncing /downloading is dir1.

@vitalif
Copy link
Owner

vitalif commented Jul 11, 2016

use grive --ignore '^(?!dir1($|/))'

@vitalif
Copy link
Owner

vitalif commented Aug 4, 2016

if you want to sync only dir then grive -s dir1 is the same and slightly more intuitive :)

@ghost
Copy link

ghost commented Sep 28, 2016

Is there any way to have grive -s or grive --ignore be remembered so that I can just tell it the next time to grive and it won't pull down the whole drive content?

@florisvdh
Copy link

man grive > option -s says :

Internally converted to an ignore regexp, remembered for next runs.

However, when you run a simple grive next time, this works not as described. Indeed, all files will be synchronised when running grive again. So, the manual does not seem correct.

'Remembering' is rather obscure to me, and may not be logical for a simple grive command. One could make an alias in .bashrc to make such things happen (alias grive='grive -s <subdir>' or alias grive='grive --ignore <regexp>'). Moreover I saw that solving issue #58 was intended to not remember.

To 'remember' things it seems to me that having a persistent includes/excludes configuration file with directory/file patterns (perl regexp syntax), would be a convenient way for the user to choose which includes/excludes to maintain by default when running grive. This has been suggested in issue #120 .

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

3 participants