> For the complete documentation index, see [llms.txt](https://taskflow-1.gitbook.io/taskflow-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://taskflow-1.gitbook.io/taskflow-docs/backup-and-recovery.md).

# Backup and recovery

## PostgreSQL

* Continuous WAL archiving with a point-in-time recovery window of 7 days, plus a daily base backup. Backups are retained for 30 days, encrypted at rest, and copied to a second region.
* Targets: RPO 5 minutes (from WAL), RTO 1 hour for a primary restore.
* A restore is the recovery path once a migration's "contract" step has shipped (see `deployment.md`): at that point rollback stops being an option and restore takes over.

## Restore drills

* The monthly staging refresh (see `deployment.md`) is performed as a restore — latest base backup plus WAL replay — so the drill and the snapshot are the same event, and restores are practiced on real data shapes (anonymized on the way in, per `environments.md`).
* The drill result is recorded in the ops log. A failed drill is a severity-3 incident (see `incident-runbook.md`).

## Redis

* Redis runs with AOF persistence (`everysec`), which bounds queue loss on a crash. No separate Redis backups are kept: presence is ephemeral by design, and queued work is either processed or lands in a dead-letter list — which is why the runbook forbids purging the queue during an incident (see `incident-runbook.md`).

## Out of scope

* The demo implementation's SQLite file is fictional data and is explicitly not backed up - on a developer's own machine for local runs, and on the host's ephemeral filesystem for the public hosted demo, where it resets on every redeploy or restart (see `taskflow-api-docs`, `data-model.md`, "Demo implementation note").


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://taskflow-1.gitbook.io/taskflow-docs/backup-and-recovery.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
