Bucket disk usage much higher than it should be after backup restore

Couchbase Server 7.0.2, single node, running on Azure Kubernetes Services.

One of our buckets is using much more disk space than it should. 55gb shown in the disk used column in the buckets UI rather than 25gb shown in an identical environment. I’ve tried compacting a few times but it has no effect.

This has happened because we have two environments that we like to keep roughly in sync. I used cbbackupmgr to take a backup on one and copy it to another. Before restore, I flushed the bucket. During the restore it timed out with “Error restoring cluster: operation failed: max retries reached”. This I figured out was due to the presence of indexes, so I deleted them and this allowed the restore to complete.

The storage backend for the bucket is CouchStore.

It’s as if the documents created during the first restore attempt are still occupying disk space. How can I free this space?

Is it possible that one bucket has compaction enabled, while the other has compaction disabled?

If there is suspicion that the space is occupied by previously-deleted data, then creating a new bucket and copying into that bucket would not include the previously-deleted data.

Thanks, it appears that the issue has corrected itself this morning. I suspect that when i manually triggered a compaction it didn’t do anything because it wasn’t within the configured compaction time window. It must have compacted overnight and cleaned it all up.

1 Like