# Versions and recovery

> Version history, the version kept before a large deletion, the server's 30-day Trash, recovery copies, and restoring damaged notes.

Source: https://baalda.com/docs/versions-and-recovery
Site: Baalda, https://baalda.com

Several independent safety nets sit under a vault, because the ways work goes missing are themselves independent: a person deletes something, a sync fault empties something, a permission change removes something, or a device loses its folder.

## Version history

A note's earlier versions are listed in the right panel, and Vault Settings, Versioning carries the vault-wide controls. Restoring a version is itself an edit, so it is undoable the same way.

## The version before a large deletion

When one edit removes most of a note, the server first keeps the note as it was, shown in Version History as Before large deletion. That is what makes a bad paste or a broken sync recoverable without anyone noticing it at the time.

## Trash

A deleted note goes to the server's Trash for 30 days, per vault, and can be restored from there. A purge leaves a tombstone row, so a push arriving late into a note that was deleted is accepted rather than recreating the note.

## Recovery copies

When something is about to leave this device, through a delete or a revocation, and this device holds edits the server has never confirmed, those edits are written to a recovery copy first. The inbound path refuses to act at all unless the server actually answered about deletions, so a silent network failure can never be read as "everything was deleted".

## Restoring notes damaged by a past sync fault

Owners and admins can list notes damaged by past sync bugs, notes that were emptied or filled with repeated punctuation, review the proposed version for each and restore the ones they choose. Every restore can be undone from Version History.

```bash
# API: GET then POST /api/vaults/:vaultId/recovery
pnpm run recover:notes
```

## Reset local copy

The last resort for one device: delete this computer's folder for the vault and restore it from the Remote Vault. It names unsent notes before it runs, and changes nothing for the team. It lives in the danger zone of Vault Settings, Vaults.
