Skip to content

VOLUME.ADMIN PRUNE-CHANGELOG

Removes changelog entries older than a given retention period to reclaim storage.

VOLUME.ADMIN PRUNE-CHANGELOG <volume-name> <retention-period>
ParameterTypeDescription
volume-namestringName of the volume, in <kind>-shard-<id> format (e.g. bucket-shard-0)
retention-periodintegerNumber of hours of changelog history to retain. Must be greater than zero.

Simple string OK on success.

Calculates a cutoff timestamp as now() - retention-period hours. Clears changelog entries older than the cutoff in a single atomic operation.

It is available on the management port (default 3320).

ConditionMessage
Missing volume name or retention period parameterERR invalid number of parameters
Retention period is zero or negativeERR retention period must be greater than zero
Volume name does not match the <kind>-shard-<id> formatERR invalid volume name: <name>

Prune changelog entries older than 24 hours:

127.0.0.1:3320> VOLUME.ADMIN PRUNE-CHANGELOG bucket-shard-0 24
OK

Retention period is zero:

127.0.0.1:3320> VOLUME.ADMIN PRUNE-CHANGELOG bucket-shard-0 0
(error) ERR retention period must be greater than zero

Invalid volume name:

127.0.0.1:3320> VOLUME.ADMIN PRUNE-CHANGELOG non-existent-volume 24
(error) ERR invalid volume name: non-existent-volume

Missing parameters:

127.0.0.1:3320> VOLUME.ADMIN PRUNE-CHANGELOG
(error) ERR invalid number of parameters