Hi, may i know is it possible to perform a cbrestore to an existing running bucket?
For example, I have remove some items from my existing bucket, and I would like to perform a restore, so that the removed items will be appear again?
The reason I asked so because, I have tried to restore the backup and nothing has happened. Unless I restore a new bucket, then all the items appear again.
This behaviour is expected, cbrestore
uses the same underlying method that XDCR uses. When documents are restore conflict resolution is used by default. This is explained in the documentation:
Conflict Resolution
By default, when restoring from a backup using
cbrestore
, Couchbase Server will perform conflict resolution on all documents to be restored. The conflict resolution behavior is the same as cross datacenter replication (XDCR), which is detailed in Availability. This is so that documents which have been updated after the backup are not incorrectly overwritten by the restore process.As a result, after running the restore process, some documents may not match the content of the backup file. In certain cases where a document has been recently deleted on the cluster, the document may not be restored at all due to this conflict resolution.
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 thecbrestore
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
Thanks very much pvarley