ifgris / obsidian-local-backup

Automatically creates a local backup of the vault.
MIT License
60 stars 5 forks source link

Backup asynchronously #38

Open Cutaiar opened 3 months ago

Cutaiar commented 3 months ago

Love this plugin. Seems to be the goto for creating vault backups. My one qualm is that creating the backup seems to happen synchronously as Obsidian opens. I (and I assume others) want Obsidian to open as fast as possible and get writing without waiting for any plugin to load.

This seems related to #35 where we want to change the startup behavior. Maybe there could be some delay (perhaps listen for when obsidian sync is done) and then back up the vault without blocking the main thread. Maybe a notification could show, indicate loading, and then indicate backup completed. All without interfering with use of Obsidian.

I think the main issue here is that you kindof do want to block the user from entering more text as you are creating a backup. Or perhaps you could just ignore changes after the backup starts.

Would love to hear peoples thoughts on this. And would be happy to help with a PR.

mudnug commented 1 month ago

Related to #4

mudnug commented 1 month ago

Backups are important to me, but the way this plugin freezes the UI has me looking for other solutions

mudnug commented 1 month ago

It looks like configuring 'Backup by Calling external file archiver' allows the plugin to backup asynchronously (my UI isn't hanging anyway)