pmario / file-backups

File Save & Backup Utility For TiddlyWiki
https://pmario.github.io/file-backups
75 stars 7 forks source link

discussion: Extending the backup strategy #39

Open pmario opened 4 years ago

pmario commented 4 years ago

@jerojerojeroppi

quote from https://github.com/pmario/file-backups/issues/34#issuecomment-660703849

Btw, one reason why I love this addon is because I find its backup scheme outstanding. Other solutions just create backup folders that grow and grow with no limit.

Thx. ... That's 1 reason why I did create it that way. It's the exact same schema that can be used by magnetic tape based backup systems. They have been expensive and you can use/overwrite them limited times.

The browser web-extension API doesn't allow devs to read the content of any directory. So it's not possible to read "back" the number of existing backup files, to delete or overwrite them. ... That's why I needed a reliable "overwrite" strategy, that provides the possibility for users to "restore" certain stages of a wiki and uses a predictable amount of space.

With fb 0.4.0 I started to save the very first version of a wiki with an exact timestamp.

There is also an idea, to save additional "milestone" backups. Eg: A "special" save button, that allows the user to create an extra backup when a wiki reaches a "working state" or a new internal "version number" ...

There could be a mechanism, that allows the user to immediately open such a milestone save. .. To see if everything works as expected. So you can be sure it's a working version.

The milestones can be used in addition to the A,B,C.. backups for "disaster recovery". Or if the user uses a "low backup number" and completely messed up all the A,B,C,... backups

I'm thinking about a new directory eg: twbackups/test.html.milestones on the same level as twbackups/test.html directory.

This makes it possible to immediately see, if a wiki has milestone backups.

What do you think?

jeroppi commented 4 years ago

I think the functionality you are describing would be a very good thing to have!

Yes, we can make a copy of the wiki at any moment, but it's somehow cumbersome. The system you envision sounds like a useful improvement to me.