Hi everybody, I want to ask a question.
Can I delete all item in a specific bucket? If can, how to do it?
Thank in advanced!
Sure, the "flush_all" or flush command is perfectly valid here and will only affect the one bucket you're working with, not the entire cluster.
You can flush a given bucket using the 'membase bucket-flush' command. Type the following command to get the details on how to use it.
More details can be found here:
Forum support is great for free but sometimes you need a guaranteed response time and dedicated resources for your questions or issues.Consider purchasing enterprise-level support from Membase: http://www.membase.com/products-and-services/overviewCall or email "sales -at- membase -dot- com" today!
Does this command work in 184.108.40.206 Windows release?
Running this command results in 400 Bad Request for me. And when using the REST API I get a "Flushing is currently not implemented" result.
Ilhan, seems like there is a bug in the REST API code, I've filed http://jira.membase.org/browse/MB-2712 for this. You should still be able to flush a bucket from your client.
Forum support is great for free but sometimes you need a guaranteed response time and dedicated resources for your questions or issues.Consider purchasing enterprise-level support from Couchbase: http://www.couchbase.com/products-and-services/overviewCall or email "sales -at- couchbase-dot- com" today!
Perry, can you please tell me what I am missing in the following bucket-flush command?
membase bucket-flush -c 192.168.1.98:8091 -u Administrator -p XXX --bucket=test_bucket3 --bucket-password=password
ERROR: unable to bucket-flush (400) Bad RequestERROR: command: bucket-flush: 192.168.1.98:8091, 2 I can successfully create and delete this bucket in CLI. Ilhan
Ilhan, unfortunately there is a bug in the current flush capability. You'll have to perform the flush of a bucket through the client code. See the above post for a link to the bug that is tracking this.
I can't seem to get this to work on the command line either:
C:\Program Files\Membase\Server\bin\cli>membase bucket-flush -c 192.168.125.106:8091 --bucket=default
ERROR: unable to bucket-flush (400) Bad Request
ERROR: command: bucket-flush: 192.168.125.106:8091, No JSON object could be decoded
also can't get it to work using rest:
C:\tools\curl>curl -i http://Administrator:firstname.lastname@example.org:8091/pools/default/buckets/default/controller/doFlush
As noted above there is a bug in the bucket flush capability in the rest api. An alternative to this method is telneting to Membase on port 11211 for the default bucket and typing "flush_all". This will flush all items out of the default bucket.
This is also fixed in 1.7. Karl, can you download the latest 1.7 beta and verify that it is working for you?
© 2013 COUCHBASE All rights reserved.