How to ignore directories in Ubuntu client?

I use Nextcloud Desktop Client Version 3.3.6 (Ubuntu).
I want to sync my entire home folder /home/seventh and exclude some big unnessasary directories, like .cache, snap etc.
I created a test directory with six folders and try to ignore files in some. This is what I write (and see it in .sync-exclude.lst on the server):


But, when I creating a files in it
touch {1..6}/123.txt
all files in all directories are uploaded on my server.
How to exlude directories from sync?

I did this about a month ago and it’s worked great since then. See my post here: Is the Linux desktop client reliable? - #14 by dms

I think there is a bug with the sync clients (not just the Linux client?) where they don’t respect the per-share ignore list. I had luck adding items to the global ignore (Settings > Advanced > Edit Ignored Files).

Make sure to ignore .local/share/Nextcloud, otherwise the client will infinitely update its status (in that directory), sync the updated status, update the status again, sync the status again, etc. I also ignored .local/share/Trash.

Also, I chose to sync only key folders within ~, because I wanted to keep the option to have local-only files and server-only files. Something to think about, depending how you see your usage growing.

Good luck to you!


1 Like

Thank you for your answer!
Can you show me your patterns?

Sure, here are the 4 I used. You might need to prefix these with .local if you’re syncing your entire ~.

And I enabled “Allow Deletion” for all 4, although I’m not really sure what that does.

1 Like