R2 archive
The optional R2 binding used for cold archive objects (coming soon).
Coming soon: automatic archiving of data to R2 is still in development. Data is currently stored in D1. You can configure the binding below ahead of time, but nothing is written to the archive automatically yet.
ARCHIVE_BUCKET is an optional R2 binding. InsightFlare Deploy does not require it, and wrangler.toml ships with the binding commented out.
Enable the binding
Create a bucket named insightflare-archive in Cloudflare, then uncomment the R2 block in wrangler.toml:
[[r2_buckets]]
binding = "ARCHIVE_BUCKET"
bucket_name = "insightflare-archive"
preview_bucket_name = "insightflare-archive-preview"You can also provide the bucket names with environment variables (INSIGHTFLARE_ARCHIVE_BUCKET_NAME and INSIGHTFLARE_ARCHIVE_PREVIEW_BUCKET_NAME).
What the binding is used for
In this version, the binding is used by the authenticated archive endpoints to list and read archive objects recorded in the archive_objects table. The service health endpoint also reports whether the bucket is bound.
The built-in scheduled tasks (hourly aggregation, notification dispatch, and database maintenance) do not write archives. This page therefore does not describe an automatic archiving schedule or an archive retention period. If you rely on cold archive behavior, check the release notes of the version you run.