File Backup Utility For TiddlyWiki
This browser add on is designed to let you easily save and backup TiddlyWikis. It is a file-based system for a single user. If you'd like your TiddlyWiki available over the network or in the cloud, please check out other options at "Getting Started With TiddlyWiki".
This add on should work with any browser that supports web-extensions. So far it's been tested with FireFox 56, 57 beta, 58 beta, (2017.11.09).
It will save TiddlyWiki5 and TiddlyWikiClassic files. For TiddlyWikiClassic the TW internal backup mechanism is switched of!
For an overview of this add on please see the introduction video: https://youtu.be/KVLtID8nElU
To install, go to: Mozilla AddOn Store
File Storage Locations
Main File Limitations
To help keep you secure, most modern browsers limit writing files to only a few locations.
This means this add on can only write to your downloads folder and its subdirectories.
For example on Windows 7 or newer, it's usually
It's a good idea to keep your TiddlyWiki in it's own subfolder. So, you'll end up with something like
The Backup Folder (Optional)
The default backup folder is called
twBackups. This can be changed in the options. It's set globally and is relative to the wiki location.
For example if your TiddlyWiki is
the backup folder defaults to
The Backup Strategy
The backups are created using a slightly modified "Tower of Hanoi" rotation strategy, similar to some tape based backup software.
The following table shows the numbering system, with 4 different files.
So the order will be: A, B, A, C, A, B, A, D, A, B, A, C, A, B, A, D, ...
As you can see:
- A will be overwritten with every 2nd save
- B will be written every 4th
- C 8th
- D 16th ...
The generic order is: 2 n-1.
Files can be restored from 1, 2, 4, 8, 16, ..., 2 n-1 saves ago!
Working with 11 files will result in 512 saves, before K is overwritten the first time. Then it will need another 1024 saves until it is overwritten again.
Eg: Starting with A, if you save your file twice a minute for eight hours, you will still have not overwriten K. K is save #1024 and 2 * 60 * 8 = 960.
The described mechanism has a "flaw", if we want a "per save" rotation. File "D" for instance, would only be be initialized after the 8th save.
So the implemented sequence is:
- Populate A, B, C, D ... then
- Start with the described rotation schema
Which will result in a slightly better recovery coverage.
Copyright Mario Pietsch 2017
CC-BY-NC-SA ... https://creativecommons.org/licenses/by-nc-sa/4.0