Tutorial: Building with CleaveDB
Drop & Restore Buckets
In addition to managing individual records, CleaveDB provides bucket-level lifecycle commands. When decommissioning a service, archiving historical datasets, or migrating between environments, you can take entire buckets offline and restore them when needed.
Soft drop an entire bucket
To take a bucket and all its contained documents offline:
DROP BUCKET staging_logsA dropped bucket is marked as inactive. Subsequent reads and writes targeting the bucket will return an error, but the underlying data remains safely stored in the engine for disaster recovery.
Restore a dropped bucket
To bring a dropped bucket back online with all its original records intact:
RESTORE BUCKET staging_logsCleaveDB re-activates the bucket partition, re-attaches its B+Tree indexes, and restores normal read and write availability immediately.
Permanently incinerating a bucket
To permanently obliterate an entire bucket and free all associated disk storage:
INCINERATE BUCKET deprecated_v1This operation irreversibly removes the bucket schema, validation guards, all member documents, vector indices, and graph pointers.
