When you want to flush a data bucket you must first enable this option then actually issue the command to flush the data bucket. We do not advise that you enable this option if your data bucket is in a production environment. Be aware that this is one of the preferred methods for enabling data bucket flush. The other option available to enable data bucket flush is to use the Couchbase Web Console, see Section 6.3.1, “Creating and Editing Data Buckets”. You can enable this option when you actually create the data bucket, or when you edit the bucket properties:
shell> couchbase-cli bucket-create [bucket_name] [cluster_admin:pass] --enable-flush=[0|1] // 0 the default and 1 to enable shell> couchbase-cli bucket-edit [bucket_name] [cluster_admin:pass] --enable-flush=[0|1] // 0 the default and 1 to enable
After you enable this option, you can then flush the data bucket.
Flushing a Bucket:
After you explicitly enable data bucket flush, you can then
flush data from the bucket. Flushing a bucket is data
destructive. Client applications using this are advised to
double check with the end user before sending such a request.
You can control and limit the ability to flush individual
buckets by setting the
on a bucket in Couchbase Web Console or via
couchbase-cli as described in the previous
section. See also
Section 6.3.1, “Creating and Editing Data Buckets”.
shell> couchbase-cli bucket-flush [cluster_admin:pass] [bucket_name OPTIONS]
By default this command will confirm whether or not you truly
want to flush the data bucket. You can optionally call this
command with the
--force option to flush data