Maintenance
Contents
Routine operational tasks for keeping the data store healthy over time.
Overview
The data store generally runs without manual upkeep, but two operations may be required over the lifetime of an XP instance:
-
Vacuuming — permanently delete blobs and metadata that are no longer referenced.
-
Reindexing — rebuild the search index from the blobstore and metadata.
Both can be triggered via the management endpoints, the Enonic CLI, or admin applications such as Data Toolbox.
Vacuuming
Deleted nodes do not immediately free up storage in XP. Blobs and parts of the version metadata are retained so that previous snapshots remain restorable. Vacuuming is the controlled mechanism for permanently removing this unreferenced data.
Vacuum tasks
XP exposes the following vacuum tasks:
| Task | Description |
|---|---|
|
|
Deletes node metadata that is no longer referenced. Default. |
|
|
Deletes snapshots older than the configured age threshold. Default. |
|
|
Deletes all blobs related to previously deleted repositories. |
|
|
Deletes binary data blobs that are no longer referenced. |
|
|
Deletes node data blobs that are no longer referenced. |
If no tasks are specified, only the default tasks (VersionTableVacuumTask and SnapshotsVacuumTask) run.
|
Before running blob-deleting vacuum tasks:
|
| Vacuuming can be scheduled to run automatically, or triggered manually via the CLI. |
Reindexing
The search index can be rebuilt at any time from the authoritative data in the blobstore and metadata index. This is most commonly required after major upgrades, but is also useful when:
-
The search index has become corrupted or inconsistent.
-
Index configuration has changed on existing content and the new mappings need to be applied.
-
You are recovering an instance where the search index is missing or unusable but the blobstore and metadata index are intact.
| Reindexing only rebuilds the search index. The metadata index is not rebuilt. If the metadata index is lost, recovery must go through snapshot restore. |
Scope
A reindex targets a specific repository and one or more branches. Reindexing one branch does not affect indices on other branches or other repositories.
When the initialize flag is set, the existing search indices are deleted before being rebuilt — this guarantees that all index mappings come from the current state of XP and the installed applications. Without it, the reindex updates the existing indices in place.
How to trigger
Reindexing can be triggered via:
-
The management endpoint —
POST repo/index/reindexfor synchronous runs, orPOST repo/index/reindexTaskfor the long-running task variant. -
The Enonic CLI.
-
Admin applications such as Data Toolbox.
| For large repositories, prefer the task variant and schedule the operation during a maintenance window. |