The current sync logic only allows you to exclude folders from sync. In my case I only want to sync a few folders, but instead of selecting those I have to exclude all the ones I don’t want to sync. And then inevitably I create additional folders or temporary folders that end up synced to mobile devices because I forgot to go back and change the list of excluded folders. This would be very simple if there were an option to only include certain folders instead of only exclude certain folders.
Proposed solution
When setting up sync specify whether the list of selected folders should be included or excluded in sync. If set to included then only those folders are synced. Otherwise the current behavior would be the default.
Current workaround (optional)
You have to always remember when creating a folder to change the sync configuration if you don’t want it synced.
Using Obsidian CLI you can only sync full vaults currently. Frequenly only a sub-folder of the vault should be shared. For example when a vault has “Home” and “Work” folders, only the “Work” folder should be synced to work machines.
This FR is also present in variations for mobile and desktop app, showing additional need.
Proposed solution
add a sync limiting command with parameter. --only-folder
Recursive sync of folder tree from as root.
eg for a folder “Home” in the vault root, command would be:
ob sync --only-folder ‘Home’
The solution should also work with --continuous command, to maintain sync between the local folder and the vault folder.
Current workaround (optional)
Forked obsidianmd:master to briannewbold:obsidian-headless, added the feature. It’s running perfectly as requested.
Closed PR (pull/23), but code layer not exposed so I couldn’t do a proper code line update PR.
Related feature requests (optional)
Consideration for additional use cases:
Syncing of multiple folders from a defined list
Syncing of complete vault except indicated folder/file(s)