This is related to
MB-27766, where cbbackupmgr has a option to restore a backup to a different bucket to that of the original backup.
cbbackupmgr tries not to interfere with the payloads from the different services. It blindly stores them and restores with looking inside. When using restoring using the --map-buckets oldBucket=newBucket option cbbackupmgr correctly updates the restore end point with the newBucket name:
The Indexer service ignores the HTTP argument and instead uses the payload which has the bucket name in it:
This means one of the following happens:
- If the bucket does not exist an error is thrown:
- If the bucket does exist then an index is created wrongly on that bucket.
Ideally I would like the payload to not include the bucket and the indexer service uses the HTTP argument as the source of true with regards to the bucket. This way cbbackupmgr keeps to the "design" of not messing with the payloads of any or all services.
If that is not possible then an error should be throw if the HTTP argument and the bucket in the payload is different.
Please note that if the 1st option is not possible then that put a requirement on parts of the payload format not changing i.e the bucket field.
|For Gerrit Dashboard: MB-29843
|MB-29843: restore index metadata to specific bucket