Canary plugin for worrywart people

A very simple plugin - All it dose is on start up, and every time interval, it compares:
Weight of the vault to previus measurment.
Number of notes previus measurment.

If the number is significantly lower then it was before - a notification pop up is shown to the user -

A Canary has died. 
... notes missing for a total of ... mb

or something like that.

The purpose of plugin is very simple - if sync, just some pluging or anything starts to delete your data, using File recovery core plugin and such methods it is possible to recover your data.

But only if you acted quickly. And for a large vault with a lot of archived data, days can pass befoure you realise that something is missing.

4 Likes

It might be good for it to also check once a day if possible, for people who never close Obsidian.

How should the change be measured? I don’t know if a simple percentage will work well for very different vault sizes; maybe an absolute number? I guess it could be configurable. Might be good to search posts of people who’ve lost files (or thought they lost files but actually their cloud service was just offloading them) for what kind of numbers have caught people’s attention.

This could also be done by an external tool. I might look into doing it in Apple Shortcuts.

It is indeed should be an absolute number.
A small one at that.

The beauty is that generaly speaking - Vault should never shrink by itself. User can delete some amount of notes, but it is not a big problem if Canary gives out a false positive due to users actions.

I also do belive that having Settings are better then Hardcoding the threshold, but lose of even 3 notes or 1 mb, should be put under question.

Same with tirggers - It should be a manual command
On Launch. And with a set interval.

Actually it is also possible to have more then one Canary, that compare only to itself.

As the only real way it can fail is if files added at the same speed they removed.
MB somewhat fixes that.
And if there different canary that compare different length of time, such as every hour vs every day.

Or a cash of all file names can be keept and literaly show what was deleted. But i am not sure how bad it is performance wise.