# Configure Persistence

The persistence feature is used to save and recover Coherence distributed caches. Cached data is persisted so that it can be quickly recovered after a catastrophic failure or after a cluster restart due to planned maintenance.

Persistence can operate in two modes:

- On-Demand persistence mode – a cache service is manually persisted and recovered upon request using the persistence coordinator. The persistence coordinator is exposed as an MBean interface that provides operations for creating, archiving, and recovering snapshots of a cache service.
- Active persistence mode – In this mode, cache contents are automatically persisted on all mutations and are automatically recovered on cluster/service startup. The persistence coordinator can still be used in active persistence mode to perform on-demand snapshots.

To configure persistence:

1. If you have not already done so, in the Change Center of the Administration Console, click Lock & Edit (see Use the Change Center).
2. In the left pane of the Console, select Environment > Coherence Clusters.
3. In the Coherence Clusters table, select the Coherence cluster for which you want a configure persistence.
4. Select the Configuration: Persistence page.
5. Use the Persistence Mode drop-down list to select a persistence mode.
6. Use the Active Directory field to override the default location where active persistence files are stored.
7. Use the Snapshot Directory field to override the default location where snapshot persistence files are stored.
8. Use the Trash Directory to override the default location where persistence files that are no longer required are stored.
9. To activate these changes, in the Change Center of the Administration Console, click Activate Changes.
   Not all changes take effect immediately—some require a restart (see Use the Change Center).