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

[S3] [user experience] cbbackupmgr fails to populate staging directory due to zero-length directory stub

    XMLWordPrintable

Details

    • Untriaged
    • 1
    • Unknown

    Description

      Running cbbackupmgr info against an S3 backup archive returns an error.  The problem is not seen when run against a file system archive.

      Note:  The example below is for an S3 backup using the EC2 instance profile for the S3 bucket access – this does not affect the problem, as I see the same error when the cbbackupmgr info command is run against an S3 backup archive that was created using the Backup Service UI with S3 hmac credentials.

      Error:

      $ cbbackupmgr info -a s3://my-test-bucket/ec2_backups --obj-staging-dir /home/ec2-user/couchbase_staging
       
      Error getting archive information: failed to get repository metadata: unexpected error while fetching objects: unexpected error from download pool: failed to open file at '/home/ec2-user/couchbase_staging/ec2_backups': open /home/ec2-user/couchbase_staging/ec2_backups: is a directory
      

       

      Details:

      $ env | grep CB
       
      CB_AWS_ENABLE_EC2_METADATA=true
       
      $ pwd
       
      /home/ec2-user
       
      $ mkdir couchbase_staging
       
      $ *cbbackupmgr config* -a s3://my-test-bucket/ec2_backups -r cluster1-repo --obj-staging-dir /home/ec2-user/couchbase_staging
       
      Backup repository `cluster1-repo` created successfully in archive `s3://my-test-bucket/ec2_backups`
       
      $ *cbbackupmgr backup* -a s3://my-test-bucket/ec2_backups -r cluster1-repo -c localhost -u myadmin -p mypassword --obj-staging-dir /home/ec2-user/couchbase_staging
       
      Backing up to '2021-01-14T03_40_31.299288005Z'
       
      Completing multipart uploads for bucket 'beer-sample'                                                                          7303 items / 2.96MB
       
      Backing up to '2021-01-14T03_40_31.299288005Z'=========================================================================================== ] 99.42%
       
      Copied all data in 4m44.539354214s (Avg. 10.67KB/Sec)                                                                          7303 items / 2.96MB
       
      [========================================================================================================================================] 100.00%
       
      Backup completed successfully
       
      Backed up bucket "beer-sample" succeeded
       
      Mutations backed up: 7303, Mutations failed to backup: 0
       
      Deletions backed up: 0, Deletions failed to backup: 0
       
      Skipped due to purge number or conflict resolution: Mutations: 0 Deletions: 0
      

       

      $ cbbackupmgr info -a s3://my-test-bucket/ec2_backups --obj-staging-dir /home/ec2-user/couchbase_staging
       
      Error getting archive information: failed to get repository metadata: unexpected error while fetching objects: unexpected error from download pool: failed to open file at '/home/ec2-user/couchbase_staging/ec2_backups': open /home/ec2-user/couchbase_staging/ec2_backups: is a directory
      
      

      (Also leaves this file  /home/ec2-user/couchbase_staging/staging-lock.lk when it errors and exits.)

       

      The backup files in S3 bucket:

      $ *aws s3 ls s3://my-test-bucket/ec2_backups --recursive*
       
      2021-01-14 02:50:43          0 ec2_backups/
       
      2021-01-14 03:52:34        125 ec2_backups/.backup
       
      2021-01-14 03:52:35         23 ec2_backups/cluster1-repo/.info
       
      2021-01-14 03:45:17         36 ec2_backups/cluster1-repo/2021-01-14T03_40_31.299288005Z/.info
       
      2021-01-14 03:45:17         18 ec2_backups/cluster1-repo/2021-01-14T03_40_31.299288005Z/.version
       
      2021-01-14 03:45:17        121 ec2_backups/cluster1-repo/2021-01-14T03_40_31.299288005Z/beer-sample-0d43e79736e31b842e9547d72741b87c/.restrictions.json
       
      2021-01-14 03:45:17        415 ec2_backups/cluster1-repo/2021-01-14T03_40_31.299288005Z/beer-sample-0d43e79736e31b842e9547d72741b87c/bucket-config.json
       
      2021-01-14 03:45:17        273 ec2_backups/cluster1-repo/2021-01-14T03_40_31.299288005Z/beer-sample-0d43e79736e31b842e9547d72741b87c/data/.collection_manifest
       
      2021-01-14 03:45:17         68 ec2_backups/cluster1-repo/2021-01-14T03_40_31.299288005Z/beer-sample-0d43e79736e31b842e9547d72741b87c/data/.storage_meta
       
      2021-01-14 03:40:38       9638 ec2_backups/cluster1-repo/2021-01-14T03_40_31.299288005Z/beer-sample-0d43e79736e31b842e9547d72741b87c/data/data_0.rift.0
       
      2021-01-14 03:41:38       6582 ec2_backups/cluster1-repo/2021-01-14T03_40_31.299288005Z/beer-sample-0d43e79736e31b842e9547d72741b87c/data/data_1.rift.0
       

      Attachments

        Issue Links

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

          Activity

            People

              joe.mitchelljones Joe Mitchell Jones
              hyun-ju.vega Hyun-Ju Vega
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty