@Alex_P, I wasn’t aware I could unsync a specific directory, but … To unsync it, it had to be synced first, and my idea was not to sync it to start with: to add it to the ignore list before it was created.
Perhaps if I explain what usage I had in mind, my request will be clearer. I’m backing up a local directory to an external USB drive in a way that renames and directory changes are detected (it would be fabulous if insync could also do this !), so, following these tips, I do:
- Create a shadow directory under the source directory with the same directory structure as the source directory, but hard-linking all regular files
- rsync the contents of the source directory — which include the shadow directory —, preserving hard links, to the destination directory
- Update the shadow directory in the source directory
- Update the shadow directory in the destination directory
This will prevent renamed files (or files which have been moved) to be transferred again. So the ~/gdrive directory will have a shadow directory directly under it which I don’t want to synchronize with my Google Drive. In order to selectively unsync it, I would have to create it, let insync synchronize it with Google Drive, and then unsync it. The result would be: as the shadow directory has hard links to ALL files under ~/gdrive, insync would upload again a second copy of ALL files. I wasn’t aware of the ignore list feature, so that’s what happened why I tried out this shadow backup.
In any case, it would be useful, if not necessary, to be able to specify files and folders in the ignore list anchoring them somewhere in the directory structure, either with an absolute path or relative to the root of the synchronization. rsync
has very flexible and comprehensive ways of specifying the exclude patterns, it would be useful to have some it implemented in insync’s ignore list.