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

cbbackup creates incorrect directory structure when empty buckets precede non-empty buckets alphabetically

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 4.5.1
    • 4.0.0, 4.1.0, 4.1.1, 4.5.0
    • tools
    • None
    • Untriaged
    • Yes

    Description

      MB-12569 correctly fixes this error for 3.x clusters, but the issue has been re-introduced since 4.x with the addition of provide_index() to pump_dcp.py.

      To recreate, take a single node of 4.x, with the index service enabled, an empty default bucket, and the travel-sample bucket.

      From the shell, create an empty backups directory, then run cbbackup:

      $ mkdir backups
       
      $ /opt/couchbase/bin/cbbackup http://127.0.0.1:8091 backups/ -u Administrator -p Passw0rd
      .
      bucket: default, msgs transferred...
             :                total |       last |    per sec
       byte  :                    0 |          0 |        0.0
        [#####################] 102.5% (29734/estimated 29000 msgs)
      bucket: travel-sample, msgs transferred...
             :                total |       last |    per sec
       byte  :             34052289 |   34052289 |   964577.0
      done
      

      Observe that the directory structure is incorrect - backups/bucket-default/ should be backups/2016-06-24T122929Z/:

      $ ls -lR
      .:
      total 4
      drwxrwxr-x 3 vagrant vagrant 4096 Jun 24 12:29 backups
       
      ./backups:
      total 4
      drwxrwxr-x 3 vagrant vagrant 4096 Jun 24 12:29 bucket-default
       
      ./backups/bucket-default:
      total 8
      drwxrwxr-x 3 vagrant vagrant 4096 Jun 24 12:29 2016-06-24T122929Z-full
      -rw-rw-r-- 1 vagrant vagrant   56 Jun 24 12:29 index.json
       
      ./backups/bucket-default/2016-06-24T122929Z-full:
      total 4
      drwxrwxr-x 3 vagrant vagrant 4096 Jun 24 12:30 bucket-travel-sample
       
      ./backups/bucket-default/2016-06-24T122929Z-full/bucket-travel-sample:
      total 12
      -rw-rw-r-- 1 vagrant vagrant 1937 Jun 24 12:30 design.json
      -rw-rw-r-- 1 vagrant vagrant 2316 Jun 24 12:30 index.json
      drwxrwxr-x 2 vagrant vagrant 4096 Jun 24 12:30 node-10.111.150.101%3A8091
       
      ./backups/bucket-default/2016-06-24T122929Z-full/bucket-travel-sample/node-10.111.150.101%3A8091:
      total 39028
      -rw-r--r-- 1 vagrant vagrant 39894016 Jun 24 12:30 data-0000.cbb
      -rw-rw-r-- 1 vagrant vagrant    31251 Jun 24 12:30 failover.json
      -rw-rw-r-- 1 vagrant vagrant       12 Jun 24 12:29 meta.json
      -rw-rw-r-- 1 vagrant vagrant    11178 Jun 24 12:30 seqno.json
      -rw-rw-r-- 1 vagrant vagrant    16298 Jun 24 12:30 snapshot_markers.json
      

      Attachments

        Issue Links

          Activity

            People

              mikew Mike Wiederhold [X] (Inactive)
              malarky Chris Malarky
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                PagerDuty