Error : restoreIndexMetadata when restoring with cbbackupmgr

Hi, I’m using couchbase Enterprise Edition 6.5.0 build 4960
I can’t restore gsi indexes from backup, which server log should I check?

root@dchsswfcbdata01:/opt/couchbase/var/swf-couchbase-utils/indexManager# cbbackupmgr restore -a $CB_ARCHIVE_PATH -r PR -c couchbase://$CB_CLUSTER \
-u $CB_USERNAME -p $CB_PASSWORD --include-buckets hdmpPRFhir

(1/1) Restoring backup 2020-06-02T13_24_16.133314464Z
Copying at 0B/s (estimating time remaining)                                                0 items / 0B
hdmpPRFhir              [                                                                     ] 100.00%
Error restoring cluster: Internal server error while executing "POST http://dchsswfcbsvc101.hosting.cegedim.cloud:9102/restoreIndexMetadata?bucket=hdmpPRFhir" check the server logs for more details
Restore bucket "hdmpPRFhir" failed
Mutations restored: 0, Mutations failed to restore: 0
Deletions restored: 0, Deletions failed to restore: 0
Skipped due to purge number or conflict resolution: Muatations: 0 Deletions: 0

I’m using a merged backup:

root@dchsswfcbdata01:/opt/couchbase/var/swf-couchbase-utils# cbbackupmgr list -a $CB_ARCHIVE_PATH
Backup `/opt/couchbase/var/lib/couchbase/data/backups/PR/2020-06-02T13_24_16.133314464Z/hdmpPRFhirBundles-14bc7653393be543e3958fa1a86ae169/data` is either empty or it got interrupted
 Size      Items          Name
 643.03MB  -              /
 643.03MB  -              + PR
 643.03MB  -                  + 2020-06-02T13_24_16.133314464Z
 195.90MB  -                      + hdmpPRClevehr
 37B       0                          analytics.json
 415B      0                          bucket-config.json
 195.88MB  220998                     + data
 195.88MB  220998                         1024 Shards
 22.90KB   3                          full-text.json
 639B      0                          gsi.json
 2B        0                          views.json
 191.51MB  -                      + hdmpPRFhir
 37B       0                          analytics.json
 412B      0                          bucket-config.json
 191.50MB  4946                       + data
 191.50MB  4946                           1024 Shards
 2B        0                          full-text.json
 4.96KB    3                          gsi.json
 2B        0                          views.json
 64.00MB   -                      + hdmpPRFhirBundles
 37B       0                          analytics.json
 419B      0                          bucket-config.json
 64.00MB   0                          + data
 64.00MB   0                              1024 Shards
 2B        0                          full-text.json
 389B      0                          gsi.json
 2B        0                          views.json
 191.63MB  -                      + hdmpPRFhirLatest
 37B       0                          analytics.json
 418B      0                          bucket-config.json
 191.50MB  4943                       + data
 191.50MB  4943                           1024 Shards
 12.52KB   1                          full-text.json
 116.05KB  74                         gsi.json
 2B        0                          views.json

Hello @gunter,

I can’t restore gsi indexes from backup, which server log should I check?

The indexer log should contain more information .

You can also tell the restore to skip restoring the GSI index metadata (–disable-gsi-indexes) if you would like it to proceed

The task I’m doing is restoring one bucket into a new one with different name.
First step is to remap the bucket data, that’s accomplished without problem using the --map-buckets flag in the restore .
Second step is to recreate all indexes in the new bucket.
Finally I need to destroy and recreate this new bucket ( for app QA testing) as fast as possible. That’s the reason I don’t want to disable indexes, I need to flush the bucket and recreate from the backup if possible in one step.

I don’t find the error restoreIndexMetadata in the indexer.log

Any clue if is related of using same index names in different buckets?

Thanks

Gunter

Remapping of GSI is not currently supported there is an open request for it: - MB-36859

If I have 2 bucket with same index names in both buckets,
Is it supported cbbackupmgr restore of data and indexes when index names are the same in several buckets in version 6.5? That’s the problem I’m facing , restore fails because of indexMetadata error.

We need to know before proceeding to change our application to have unique index names for all buckets in the cluster.

Many thanks.

Gunter

1 Like