Cross-Vault Selective Synchronizationa

Proposal

Be able to synchronize and maintain a specific file between two different vaults. Any update in that file in one vault will update the linked file in the other vault.

For these specific files, it would probably be appropriate to automatically maintain all Obsidian links as Obsidian URI links.

Use case

It makes sense to use a separate vault for certain projects or vastly different ares of life, like PKM and professional work documentation. However, there are often a few inevitable documents that crossover between two knowledge bases that should otherwise be separate.

It would be nice to be able to maintain these few crossover cases from either vault.

Workaround

  1. Make a tough choice about which vault should should hold that file.
  2. Wherever that file would be mentioned in the vault that doesn’t have the file, use an Obsidian URI link.

You don’t get any backlink navigation or insight. And any links to the excluded vault would have to be manually maintained as URI links as changes happen.

3 Likes

I’m a little confused. Obsidian Sync already has selective sync except for this part which sounds like you’re using nested vaults:

If you don’t, and you use shortest path in your link settings, you could already use sync for this.

Hmm? It would be great if the capability was already there. By my understanding, selective sync merely syncs a subset of a single vault.

I must not have been clear. I’m not using nor was envisioning nested vaults. More like two separate vaults in a Venn-Diagram formation, where a small subset of common files are managed well by either vault.

Another variation that might clarify: A feature where you could designate a directory completely outside of an obsidian vault that obsidian maintains as if it was one of its sub-directories in the vault. And any number of vaults could manage this same external directory.

Am I wrong in thinking that nested vaults only provide file awareness in one direction? The inner vault can’t maintain “obsidian benefits” to files outside of its sub-directories. This seems to make it somewhat moot to bother having an inner vault. Might as well just acquiesce to not having separate vaults unless the inner vault is only opened as read only, less cluttered viewing experience.

Yes, that’s what sync does. But it would be possible to connect these two local vaults to the same remote vault, right? This would essentially accomplish what you want (I think).

With Sync, the common notes in the Venn Diagram would be stored in the Obsidian server and synced down to both local vaults.

This shouldn’t be a problem with Sync either as far as I know.

I can’t speak for that “external directory” outside of the vaults you want to use (it might be hard to let Obsidian know that it must watch a folder that is not a vault) nor the nested vaults (which I don’t personally use).

I’m already doing something similar to this, and argentum pretty much explained it. Here is my take on it using just 1 vault:

  • Master-Vault:
    • .obsidian
    • PKM
    • Work & Projects
    • Both

On your work computer, remove the PKM folder from sync, then on your non-work computer remove the Work & Projects from sync. Make sure they don’t exist locally (delete after you unsync) so that you can’t link between PKM and the Work folder.

Even better, you don’t even need the both folder, as anything in the master vault is synced between two systems.

1 Like

Okay, maybe I’m not fully up on what’s currently possible.

I don’t know? I didn’t think this was possible at all. These are two completely different vaults and you’re suggesting that connecting them to a common remote vault is currently possible and functional?

That’s cool you’re doing something similar. Are you able to use different CSS for PKM and Work? Following your example, what I don’t like is that it sounds like you can’t access anything from PKM when at work. Or can you still choose to sync only a specific file in PKM?

Well, sort of! You would need to connect them to the same remote vault indeed, making sure you set up selective sync as @KL94 mentioned.
From the point of view of Sync these three would be the same vault, and you’re just syncing one of their folders. The unsynced parts are not part of the shared vault.

One downside of this is that you can only be connected to one remote vault at a time, which means only the common notes would be synced (and backed up).

For CSS, if you mean that your work vault will have different CSS than your vault at home then yes because it doesn’t sync the .obsidian folder.

For accessing PKM at work, you can put the files in the PKM folder that you want available at work into the parent (master-vault) level and it will be synced to both machines.

Also you should be accessing the vault in the master-vault level and not using nested vaults.

I’m retracting this feature request. Admins, feel free to archive if you see fit. The UX simplicity I’m envisioning is probably not worth the back-end programming required.

1 Like

I was wondering if there is a solution for this that is not folder based, but tag/dataview-key based. I want to sync files related to a project to a online sync folder. so that my team can work on those files and they stay in sync with my local copy and their local copies.

these files are not in one folder, they are scattered around a few different folders, but all are marked with a project related dataview inline field.

these inlcude project files but also contact files for example. these contact files are not project-only. so a person could be in two projects for example. but their info should be synced to the project folder/git/vault

i found the git-publish plugin … that is a great “half way” :slight_smile: but sadly no sync back into my vault if there are changes to the file.

i really cant quite get my head around this selective sync. and all because its not folder based … maybe someone has the right nudge for me. i am sure that there is a solution for this. but without forcing my co-workers into paying for sync. (we are a non profit startup and we all volunteer)