# Back up, restore, and recover

Backups in Ripple Custody have two distinct scopes:

- **Platform state backups** protect operational state such as PostgreSQL data, configuration, request state, events, and recovery metadata.
- **Vault and KMS backups** protect the key material or key shares required to recover signing capability.


Do not treat one scope as a substitute for the other. Restore planning must account for both platform state and vault key material.

## What to back up

| Backup scope | What it protects | Where to go |
|  --- | --- | --- |
| PostgreSQL database | Platform source of truth, including state used by accounts, transactions, requests, and events. | [Database planning](/products/custody/v1.36/deployment/planning/database), [Resilience planning](/products/custody/v1.36/deployment/planning/resilience) |
| Anti-rewind file and state review authority process | State recovery and rollback protection. | [Recover anti-rewind file](/products/custody/v1.36/operations-and-maintenance/backup-and-restore/recover-anti-rewind-file), [Register a key](/products/custody/v1.36/operations-and-maintenance/backup-and-restore/register-a-key) |
| HSM-backed vault key material | HSM-protected master seed or wrapped seed material, depending on the KMS integration. | The relevant KMS integration guide under [Integrate a KMS](/products/custody/v1.36/deployment/integrate-kms/overview) |
| MPC-backed vault key material | Customer-held encrypted MPC backups and validation artifacts. | [MPC backups](/products/custody/v1.36/deployment/integrate-kms/mpc/backups) |
| Cold vault operation payloads | Offline cold-vault operation exchange files and signing workflow material. | [Cold vaults](/products/custody/v1.36/identity-and-access/vault-management/cold-vaults), [Cold vault API operations](/products/custody/v1.36/identity-and-access/vault-management/cold-vault-setup-api), [Cold vault UI operations](/products/custody/v1.36/identity-and-access/vault-management/cold-vault-setup-ui) |


For vault-level key strategy context, see [Vaults](/products/custody/v1.36/identity-and-access/vault-management#key-strategies-and-backup-implications).

## Backup procedures

Use this section to route operators to the correct backup procedure. The exact runbook depends on the deployment model and KMS.

### Platform state

Back up PostgreSQL and platform state according to your deployment architecture. For on-premises deployments, your operations team owns database backup, replication, retention, and restore testing. For Ripple-managed environments, coordinate with your Ripple account team.

Review:

- [Database planning](/products/custody/v1.36/deployment/planning/database)
- [Resilience planning](/products/custody/v1.36/deployment/planning/resilience)
- [Recover anti-rewind file](/products/custody/v1.36/operations-and-maintenance/backup-and-restore/recover-anti-rewind-file)


### HSM-backed vaults

For HSM-backed vaults, follow the backup procedure for the specific HSM platform and deployment model. HSM backup requirements vary by vendor and by whether the deployment uses physical HSMs, cloud HSMs, or wrapped key material.

Start with the relevant KMS guide under [Integrate a KMS](/products/custody/v1.36/deployment/integrate-kms/overview).

### MPC-backed vaults

For MPC-backed vaults, use the customer-held MPC backup workflow:

1. Generate the backup encryption and decryption keys.
2. Associate the backup encryption key with the vault.
3. Submit the `v0_CreateBackup` intent.
4. Check backup status.
5. Download the trusted entity backup payload.
6. Acknowledge receipt with `v0_AcknowledgeBackup`.
7. Verify the downloaded backup.


For the full procedure, see [MPC backups](/products/custody/v1.36/deployment/integrate-kms/mpc/backups).

## Restore procedures

### Platform state restore

Use your database restore runbook together with the anti-rewind file recovery process. For source material, see:

- [Recover anti-rewind file](/products/custody/v1.36/operations-and-maintenance/backup-and-restore/recover-anti-rewind-file)
- [Register the state review authority key](/products/custody/v1.36/operations-and-maintenance/backup-and-restore/register-a-key)
- [Database planning](/products/custody/v1.36/deployment/planning/database)


### HSM-backed vault restore

For HSM-backed vaults, use the restore process for the specific KMS and vendor deployment. Requirements vary by HSM provider, cluster model, wrapping-key approach, and whether the HSM backup is managed by the cloud provider or by the customer.

Start with the relevant guide under [Integrate a KMS](/products/custody/v1.36/deployment/integrate-kms/overview).

### MPC-backed vault recovery and exit

For MPC-backed vaults, use the MPC backup material and the exit strategy process described in [MPC backups](/products/custody/v1.36/deployment/integrate-kms/mpc/backups#exit-strategy).

## Validation

Validate backups before you rely on them in production.

| Backup type | Validation activity |
|  --- | --- |
| PostgreSQL and platform state | Run restore drills in a non-production environment and confirm that requests, events, accounts, and configuration state are usable. |
| Anti-rewind file recovery | Exercise the anti-rewind file recovery process and verify the state review authority key path. |
| HSM-backed vault material | Test the vendor-specific HSM restore procedure according to your KMS runbook. |
| MPC-backed vault material | Run the backup verification script against the downloaded backup JSON. |


For MPC-specific validation details, see [Verify the backup](/products/custody/v1.36/deployment/integrate-kms/mpc/backups#verify-the-backup).

## Related recovery procedures

| Need | Procedure |
|  --- | --- |
| Register or rotate the state review authority key | [Register the state review authority public key](/products/custody/v1.36/operations-and-maintenance/backup-and-restore/register-a-key) |
| Recover the anti-rewind file | [Recover your anti-rewind file](/products/custody/v1.36/operations-and-maintenance/backup-and-restore/recover-anti-rewind-file) |
| Recover cold vault operations after workstation loss | [Recover a cold vault](/products/custody/v1.36/identity-and-access/vault-management/cold-vault-recovery) |