lambrospetrou / tiddlyflare

Hosting platform for TIddlyWikis.
https://tiddly.lambros.dev
MIT License
4 stars 1 forks source link

Automatic Backups of wikis #8

Open lambrospetrou opened 19 hours ago

lambrospetrou commented 19 hours ago

Even though we keep up to 10 versions of the HTML file inside the SQLite DO database, it would be nice to do a backup of the latest version to a second place periodically, e.g. daily.

Shit happens, so let's not lose our data.

This issue will add this automatic backup as an optional feature to Tiddlyflare.

We have the following options for the backup:

  1. Use R2 blob storage, and just dump the latest HTML file when the backup job runs into a bucket. This requires creating the bucket beforehand, and adding that binding in wrangler.toml, so more things to manage.
  2. Use N replica WikiDOs that will just hold a copy of the backed up content. These DOs should be in a different REGION from the main wiki DO for durability reasons.

If using DOs, the feature will be on automatically. If using R2 the feature should have an env.ENABLE_BACKUPS flag.