Prevent closing Obsidian if it is currently syncing (or keep syncing in the background)

This feature request applies to mainly Obsidian Sync.

Use case or problem

I would like it if the application prevented me from closing it (or kept syncing in the background). Currently I am having pretty much daily a situation where I have written a lot of new things in a note and I close obsidian before it is has finished syncing. This means that when opening on a different device there is content missing.

Proposed solution

My proposed solution is to either:

  • Prevent the application from being closed.
  • Ask if it should wait until synced before closing.
  • Keeping the sync going in the background until finished.

Current workaround (optional)

I have not found a workaround except for learning to wait!

Mod edit Related feature request

4 Likes

There’s an existing request for “keep syncing in background”. If you’re on iOS, the system limits background activity so there’s not much that can be done there.

You can turn on Settings > Sync > Prevent Device Sleep. I don’t know how much it helps, but I’m using it.

Update 2025-04-16: Stopped using this a while ago because I started finding my phone awake when it shouldn’t be. A recent conversation made me wonder if that might be a bug, tho. Still a useful option when doing first sync or a big restructure.

2 Likes

I still have this problem. I often restructure folders and rename them or move them in a subfolder. This not only often takes ages it doesn’t sync to my mobile device or vice versa

Perhaps if the user attempts to close the app while it’s actively syncing, the app could pop up a modal that asks the user if they’re sure they want to close while still syncing:

  • If the user clicks “Close”, then the app closes regardless of sync status.
  • If the user clicks “Wait”, then the app will stay open until the sync is complete.
  • If the user clicks “Cancel”, then the app will abort the close action.

3 Likes