> For the complete documentation index, see [llms.txt](https://docs.gotempest.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gotempest.app/accounts-vaults-and-privacy/vault-history.md).

# Vault History — Inspect & Restore Earlier Versions

Inspect, compare, copy and restore retained encrypted vault revisions, with Tempest Cloud retention limits and CouchDB settings for self-hosting.

**History** lets you inspect earlier versions of a saved vault entry, compare a revision with its parent, copy its content, or restore it as a new current version. It requires **Tempest Pro**, a signed-in account, an unlocked synced vault and access to its server.

This page covers **document revision history**. It is separate from terminal command history, session recordings and [Drive run history](/ai-and-automation/snippets-scheduled-runs.md#run-history).

{% hint style="warning" %}
History is a view of revisions the sync server still retains, not a guaranteed backup. **Tempest Cloud does not guarantee history availability or a retention period.** Revisions may remain for a long time and then be cleaned up together during maintenance. A version visible today may be unavailable later. Keep a separate backup of anything you must retain.
{% endhint %}

## Open History

### Desktop / web

1. Find the saved connection in your host list.
2. Right-click it and choose **History** (clock/rewind icon).
3. Select a revision in the version list to load its preview.

### iOS / Android

1. Open the saved host's action menu in the host list.
2. Choose **History**.
3. Tap a version to view it, copy its content or restore it when permitted.

History is not offered for a local-only vault: the current feature reads retained revisions from the sync server. An empty list means no readable server history is available; it does not prove the entry was never edited.

## Read a revision

The list shows revision identifiers and timestamps when present. Older entries may show **Time unknown**. Version numbers identify revisions, not a promise that every intermediate edit is retained.

The preview shows the decrypted document and encrypted server representation, with changes against the selected revision's parent when that parent is available. If a parent was removed by compaction, its content is unavailable and the preview shows the selected content instead of inventing a complete comparison.

Only retained, readable revisions on the current revision branch are listed. Unsynced edits, discarded branches and bodies already removed from the server are not a complete audit trail. Revision content is decrypted by your vault client, using the active vault's key.

## Copy or restore

**Copy content** copies the selected revision's full decrypted JSON document. It may contain passwords or private keys; treat the clipboard and any exported file as sensitive.

**Restore this version** asks for confirmation and replaces the current entry's content with the selected version. The restore is saved and synced as a **new revision**. It does not rewind the database or change every other document.

Restoring also follows the vault's write permissions. A member who can view a shared vault's history but cannot edit its saved connections cannot restore those connections. Check the preview carefully: restoring can bring back an old hostname, credential or trusted host fingerprint.

```mermaid
flowchart LR
    A[Retained server revision] --> B[Decrypt and preview]
    B --> C[Confirm restore]
    C --> D[New local revision]
    D --> E[Sync new current version]
```

## Use History from the CLI

```bash
tempest login
tempest unlock
tempest ssh list
tempest history list DOCUMENT_ID
tempest history browse DOCUMENT_ID
tempest history show DOCUMENT_ID REVISION_ID
tempest history show DOCUMENT_ID REVISION_ID --json
tempest history copy DOCUMENT_ID REVISION_ID
tempest history restore DOCUMENT_ID REVISION_ID
```

Use the exact document and revision IDs from the listings. `browse` is interactive: arrows or `j`/`k` select a version, `c` copies, `r` requests a restore and `q` exits. It is also available with `h` in the saved-server TUI.

`copy` uses the terminal's OSC 52 clipboard support. If the terminal does not support it, or you are piping output, use `show --json`. Add `--yes` to `restore` only when you intend to skip the interactive confirmation.

For diagnostics:

```bash
tempest history inspect DOCUMENT_ID
```

This reports server revision availability and the revision limit. `history probe` is a separate diagnostic that **creates and edits a test document**, leaves it for inspection and does not trigger compaction. See `tempest history --help` and the [CLI guide](/cli/tempest-cli.md).

## Tempest Cloud: no guaranteed retention

On Tempest Cloud, History is available only while the relevant encrypted revision bodies remain on the server. There is **no guaranteed retention duration, version count or continued availability**. Cleanup may happen infrequently, removing many older revisions in one maintenance operation after a long interval.

A Pro entitlement enables access to the feature; it does not reserve permanent storage for old revisions. Copy/export important versions while they are readable, and keep your own backups.

## Self-hosting: disable CouchDB automatic database compaction

To retain history in a self-hosted deployment, **disable CouchDB auto compact for the vault databases**. Compaction removes non-leaf revision bodies; keeping revision IDs alone is insufficient to read or restore their content. CouchDB enables automatic compaction by default. See [CouchDB compaction](https://docs.couchdb.org/en/stable/maintenance/compaction.html).

For CouchDB 3.x's **smoosh** scheduler, add the following to your persisted `local.ini`:

```ini
[smoosh]
db_channels =
```

This removes automatic database-compaction channels, including upgrade-triggered channels. View-index compaction can keep its existing configuration. The channel list is node-local, so apply the setting on **every CouchDB node**. See [CouchDB compaction configuration](https://docs.couchdb.org/en/stable/config/compaction.html).

With the [Docker Compose deployment](/self-hosting-and-web-mode/self-host-tempest-server-docker-compose.md), edit `couchdb/local.ini`, which is mounted at `/opt/couchdb/etc/local.d/local.ini`, then restart CouchDB:

```bash
docker compose restart couchdb
```

Verify the effective `smoosh.db_channels` setting in CouchDB's configuration on every node. Make sure a later configuration file does not override it, and check that no database compaction is already running or scheduled by an external maintenance job. Disabling the scheduler does not undo a completed compaction or recover deleted revision bodies.

Also review these limits:

* **Manual compaction:** running it on a vault database can remove history even with auto compact disabled.
* **Revision limit (`_revs_limit`):** this affects retained ancestry; increasing it does not recover compacted bodies.
* **Replication/migration:** ordinary replication does not preserve a full archive of previous revision bodies.
* **Disk use:** retaining old bodies consumes storage. Monitor capacity and keep tested database backups; decide explicitly when to trade retained history for reclaimed space.

## See also

* [Accounts & Multiple Accounts](/accounts-vaults-and-privacy/accounts-and-vaults.md)
* [End-to-End Encryption](/accounts-vaults-and-privacy/end-to-end-encryption.md)
* [Where Tempest Stores Your Credentials](/accounts-vaults-and-privacy/where-tempest-stores-credentials.md)
