---
id: "datastore-missing-backup"
type: "rule"
severity: "error"
url: "https://localhost:3000/catalogue/rules/datastore-missing-backup"
---

# Datastore without backup or retention

| | |
|---|---|
| Severity | error |
| Selects | every node of kind sql-database |
| Components in scope | 76 |

## Why

A system of record with backups off, or with no retention period stated, cannot be restored. The loss is discovered on the day it matters.

## What it checks

It looks at every node of kind sql-database, and fires when:

- any of these hold:
  - the node's `backupEnabled` is false
  - the node's `backupRetentionDays` has no value

Message template:

```
Datastore '{{node.id}}' has no backup or no retention policy declared.
```

## Applies to

- [SQL database](https://localhost:3000/catalogue/kinds/sql-database.md) `sql-database`

76 catalogue components fall under it.

## Tripped by

Reference designs whose broken twin names this rule in its header:

- [canva-uploads](https://localhost:3000/d/zeema/canva-uploads)
- [discord-messages](https://localhost:3000/d/zeema/discord-messages)
- [dropbox-sync](https://localhost:3000/d/zeema/dropbox-sync)
- [facebook-messenger](https://localhost:3000/d/zeema/facebook-messenger)
- [figma-multiplayer](https://localhost:3000/d/zeema/figma-multiplayer)
- [gitlab-architecture](https://localhost:3000/d/zeema/gitlab-architecture)
- [multi-region-web](https://localhost:3000/d/zeema/multi-region-web)
- [nearby-friends](https://localhost:3000/d/zeema/nearby-friends)
- [netflix-streaming](https://localhost:3000/d/zeema/netflix-streaming)
- [notion-sharding](https://localhost:3000/d/zeema/notion-sharding)
- [nubank-core](https://localhost:3000/d/zeema/nubank-core)
- [pinterest-feed](https://localhost:3000/d/zeema/pinterest-feed)
- [pokemon-go](https://localhost:3000/d/zeema/pokemon-go)
- [spotify-playback](https://localhost:3000/d/zeema/spotify-playback)
- [stock-exchange](https://localhost:3000/d/zeema/stock-exchange)
- [unique-id-generator](https://localhost:3000/d/zeema/unique-id-generator)

## Source (`rule` YAML, verbatim)

```yaml
# yaml-language-server: $schema=../schema/rule.schema.json
# A system of record with no backup or no stated retention is an unrecoverable data loss
# waiting to happen. Tripped by designs/multi-region-web.broken.yaml.
schemaVersion: "1"
type: "rule"
id: "datastore-missing-backup"
severity: "error"
select:
  node:
    kind: "sql-database"
when:
  any:
    - prop: "backupEnabled"
      equals: false
    - prop: "backupRetentionDays"
      exists: false
message: "Datastore '{{node.id}}' has no backup or no retention policy declared."
```

Human page: https://localhost:3000/catalogue/rules/datastore-missing-backup
