Cbrestore question

I am restoring a bucket from prod cluster to a dev cluster for data refresh purpose on an ongoing basis.

The requirement is to overwrite the existing keys and insert newer keys but not delete any keys in target. Referring the documentation for cbrestore,

“To restore the contents of a backup while overwriting current documents with the same key, pass the extra parameter conflict_resolve=0 as part of the cbrestore command. To ensure that only the documents contained in the backup exist in the bucket after performing the restore, flush the bucket prior to performing the restore”

It sounds like conflict_resolve =0 is the parameter, I need. However, the next line confuses me that to ensure the contents of backup are fully restored, please flush the bucket. I want to preserve the data that’s already there in the destination. Any ideas?

Hi chetan,
Thanks for using our product.
For the restore with option conflict_resolve=0, you don’t need to flush the bucket as mention in this document.

Example for restoring data while ignoring conflict resolution

The following example requests a restoration of data while ignoring the built-in conflict resolution. This causes all documents in the backup file to be restored regardless of whether the documents in the target cluster would win conflict resolution.

https://docs.couchbase.com/server/5.5/cli/cbrestore-tool.html