Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-30152

cbbackupmgr does not restore GSI indexes and prints an warning about `--bucket-map` when it's not being used

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 5.5.0
    • 5.5.0
    • tools
    • Untriaged
    • Yes

    Description

      Problem
      cbbackumgr does not restore GSI indexes and prints an warning about `--bucket-map` when it's not being used.

      On the console, there is an error seen:

      [root@node1-vulcan-testing-centos7 bin]# ./cbbackupmgr restore -a /tmp/backup -r backup -c localhost -u Administrator -p password
      `--bucket-map` option only works for the Data service. Will not restore the metadata for any other service
       
      (1/1) Restoring backup 2018-06-18T15_49_04.236446271Z 
      Copied all data in 1s (Avg. 3.06MB/Sec)                                                                                                                                                  7303 items / 3.06MB
      beer-sample             [==========================================================================================================================================================================] 100.00%
       
      Restore completed successfully
      

      There is no error in backup.log as well to justify failing of restoring GSI indexes:

      2018-06-18T15:49:58.570+00:00 (Cmd) cbbackupmgr version 1.3.0
      2018-06-18T15:49:58.570+00:00 (Cmd) restore -a /tmp/backup -r backup -c localhost -u <ud>Administrator</ud> -p ******** 
      2018-06-18T15:49:58.570+00:00 (Cmd) `--bucket-map` option only works for the Data service. Will not restore the metadata for any other service
      2018-06-18T15:49:58.572+00:00 (Rest) GET http://localhost:8091/pools 200
      2018-06-18T15:49:58.573+00:00 Lowering forestdb buffer cache size to 1073741824 due to insufficient memory
      2018-06-18T15:49:58.588+00:00 [INFO][FDB] Forestdb blockcache size 1073741824 initialized in 15663 us
       
      2018-06-18T15:49:58.589+00:00 [INFO][FDB] Forestdb opened database file /tmp/backup/backup/2018-06-18T15_49_04.236446271Z/beer-sample-a75f72bd7b0fb9c47d531f4c189fd77b/data/shard_0.fdb
      2018-06-18T15:49:58.603+00:00 [INFO][FDB] Forestdb closed database file /tmp/backup/backup/2018-06-18T15_49_04.236446271Z/beer-sample-a75f72bd7b0fb9c47d531f4c189fd77b/data/shard_0.fdb
      2018-06-18T15:49:58.603+00:00 Restoring data from backup 2018-06-18T15_49_04.236446271Z
      2018-06-18T15:49:58.603+00:00 (Plan) Executing transfer plan
      2018-06-18T15:49:58.603+00:00 (Plan) Checking for data movement restrictions between beer-sample and beer-sample
      2018-06-18T15:49:58.609+00:00 (Rest) GET http://localhost:8091/pools/default/buckets 200
      2018-06-18T15:49:58.612+00:00 (Rest) GET http://localhost:8091/pools/default 200
      2018-06-18T15:49:58.612+00:00 Transfering to Couchbase Server 5.5.0
      2018-06-18T15:49:58.612+00:00 (Plan) Transfering views definitions for beer-sample to beer-sample
      2018-06-18T15:49:58.612+00:00 (Rest) GET http://localhost:8091/pools/default/nodeServices 200
      2018-06-18T15:49:58.672+00:00 (Rest) PUT http://10.112.180.101:8091/couchBase/beer-sample/_design/beer 201
      2018-06-18T15:49:58.672+00:00 (Plan) Deciding which key value data to transfer for beer-sample
      2018-06-18T15:49:58.672+00:00 [INFO][FDB] Forestdb opened database file /tmp/backup/backup/2018-06-18T15_49_04.236446271Z/beer-sample-a75f72bd7b0fb9c47d531f4c189fd77b/data/shard_0.fdb
      2018-06-18T15:49:58.766+00:00 [INFO][FDB] Forestdb closed database file /tmp/backup/backup/2018-06-18T15_49_04.236446271Z/beer-sample-a75f72bd7b0fb9c47d531f4c189fd77b/data/shard_0.fdb
      2018-06-18T15:49:58.767+00:00 (Plan) Transfering new key value data for beer-sample to beer-sample
      2018-06-18T15:49:58.771+00:00 (Rest) GET http://localhost:8091/pools/default/buckets 200
      2018-06-18T15:49:58.772+00:00 (Rest) GET http://localhost:8091/pools/default/nodeServices 200
      2018-06-18T15:49:58.775+00:00 [INFO][FDB] Forestdb opened database file /tmp/backup/backup/2018-06-18T15_49_04.236446271Z/beer-sample-a75f72bd7b0fb9c47d531f4c189fd77b/data/shard_0.fdb
      2018-06-18T15:49:59.209+00:00 [INFO][FDB] Forestdb closed database file /tmp/backup/backup/2018-06-18T15_49_04.236446271Z/beer-sample-a75f72bd7b0fb9c47d531f4c189fd77b/data/shard_0.fdb
      2018-06-18T15:49:59.597+00:00 (Plan) Data transfer completed after 823.308263ms
      2018-06-18T15:49:59.597+00:00 (Plan) Transfer of all data complete 
      2018-06-18T15:49:59.597+00:00 (Plan) Transfer plan finished successfully
      2018-06-18T15:49:59.607+00:00 (Cmd) Restore completed successfully
      

      Background
      Build : 5.5.0-2807
      This is a regression since the related GSI backup tests were working on 5.5.0-2884

      Steps to reproduce

      1. 4-node cluster : kv+query+index, index ,index, index.
      2. Install beer-sample dataset
      3. Create an index as follows - create index idx1 on `beer-sample`(name) partition by hash(meta().id)
      4. Take a backup
      5. Verify that gsi.json exists and is correct for this backup.
      6. Delete the beer-sample bucket, and recreate the bucket. Keep it empty
      7. Restore the backup.

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              mihir.kamdar Mihir Kamdar (Inactive)
              mihir.kamdar Mihir Kamdar (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty