# Updates and backups

> Update and roll back Pulse Relay, back it up and restore it, manage its disk space, and use the rescue commands when something goes wrong.

- Section: Teams
- Availability: Free and Team licenses, from the relay’s web interface and the server.
- URL: https://pulse-app.si/en/docs/team/relay-ops

## Update

The relay looks for a new version every 6 hours and shows a badge on **Réglages** (Settings). The owner opens **Réglages › Mises à jour** (Updates), then **Mettre à jour vers la X** (Update to X).

- The relay makes a backup first.
- It stops receiving for about 30 seconds. Your apps resend what was waiting.
- If the new version doesn’t start, it automatically returns to the previous one.

**Revenir à la X** (Go back to X) restores the previous version by hand.

## Automatic install

| Under **Installation automatique** | Default |
| --- | --- |
| **Correctifs de sécurité** (Security fixes) | On |
| **Toutes les versions** (All versions) | Off |

These installs happen at night, from 2 a.m. to 5 a.m. server time.

## Backups

Go to **Réglages › Sauvegardes** (Backups). This requires the Administrator role or higher.

- One copy every night at 3 a.m. server time, and one before each update. **Sauvegarder maintenant** (Back up now) makes one right away.
- **Copies gardées** (Copies kept): 14 by default.
- Logs aren’t included. The relay’s identity and certificate are copied to `backups/keys`.
- Everything is in `/var/lib/pulse-relay/backups`.

> **Copy them elsewhere**
>
> Backups stay on the same server as the relay. If the disk or the server is lost, they’re lost too, so copy this folder off the server.

## Restore

Run these commands on the server, replacing the file name with the copy you chose. On a new server, install the relay first and copy the `backups` folder over.

**On the server**

```bash
cd /opt/pulse-relay && docker compose stop relay
cp /var/lib/pulse-relay/backups/relay-2026-10-20T03-00-00-000Z.db /var/lib/pulse-relay/relay.db
rm -f /var/lib/pulse-relay/relay.db-wal /var/lib/pulse-relay/relay.db-shm
# Only on a new server:
cp /var/lib/pulse-relay/backups/keys/identity.json /var/lib/pulse-relay/
cp /var/lib/pulse-relay/backups/keys/self-signed.* /var/lib/pulse-relay/tls/
docker compose start relay
```

## Storage and retention

| In **Réglages › Stockage et conservation** | Effect |
| --- | --- |
| Logs, **Garder** (Keep) and **Taille maximale** (Maximum size) | The first limit reached applies. Cleanup removes at most 5,000 lines per minute. |
| **Rapports et mesures** (Reports and metrics) | Retention period |
| **Alertes résolues** (Resolved alerts) | Retention period |
| Per-app duration | Replaces the general duration for that app |

When free disk space falls below 10%, the relay reduces logs older than 24 h by a tenth at a time, at most every 10 minutes. It accepts 3,000 log lines per minute per app.

## Rescue commands

They’re listed under **Réglages › Zone sensible › Commandes de secours** (Sensitive area, Rescue commands), and you run them on the server.

| Command | When |
| --- | --- |
| `docker exec pulse-relay setup-code` | You need a new first sign-in code |
| `docker exec pulse-relay reset-password camille@helio.app` | A user lost their password |
| `docker logs -f pulse-relay` | Read what the relay is doing live |

## Activity

The **Utilisateurs** (Users) page shows who did what on the relay, and **Exporter en CSV** (Export as CSV) gives you a copy.

- [Pulse Relay](https://pulse-app.si/en/docs/team/relay): Licenses, alerts, roles.
- [Install the relay](https://pulse-app.si/en/docs/team/relay-install): On a new server.
- [Contact support](https://pulse-app.si/en/docs/help/contact): If the relay stays stuck.
