XMLWordPrintable

Details

    • False
    • False
    • Hide
      = Creating a backup in AWS S3 using `{prod-cli}` is not working

      Creating Backup in AWS S3 using `{prod-cli}` is not working.
      Show
      = Creating a backup in AWS S3 using `{prod-cli}` is not working Creating Backup in AWS S3 using `{prod-cli}` is not working.
    • Hide

      1. Create an S3 bucket for backup
      2. Create and backup in AWS s3 usin command: `crwctl server:backup -r s3:s3.amazonaws.com/codeready-test-bucket -p test-bucket --aws-access-key-id=<secret-id> --aws-secret-access-key=<secret-key>`
      3. Restore the backup using crwctl command: `crwctl server:restore -r s3:s3.amazonaws.com/codeready-test-bucket -p test-bucket --aws-access-key-id=<secret-id> --aws-secret-access-key=<secret-key> -s 07d39879`

      Show
      1. Create an S3 bucket for backup 2. Create and backup in AWS s3 usin command: `crwctl server:backup -r s3:s3.amazonaws.com/codeready-test-bucket -p test-bucket --aws-access-key-id=<secret-id> --aws-secret-access-key=<secret-key>` 3. Restore the backup using crwctl command: `crwctl server:restore -r s3:s3.amazonaws.com/codeready-test-bucket -p test-bucket --aws-access-key-id=<secret-id> --aws-secret-access-key=<secret-key> -s 07d39879`

    Description

      Creating Backup in AWS S3 using crwctl actually is not working. Crwctl throw `[object object]`.

      Full crwctl log:

      ❯ ./bin/run server:restore -r s3:s3.amazonaws.com/codeready-test-bucket -p test-bucket --aws-access-key-id=<secret-id> --aws-secret-access-key=<secret-key> -s 07d39879
      Debugger listening on ws://127.0.0.1:9229/0f8eb5db-bf57-4f72-b9ec-54bd3221e72c
      For help, see: https://nodejs.org/en/docs/inspector
      Debugger attached.
      › Current Kubernetes context: 'default/api-cluster-42a0-42a0-sandbox902-opentlc-com:6443/opentlc-mgr'
        ✔ Verify Kubernetes API...OK (it's OpenShift)
        ✖ Scheduling restore...
          → [object Object]
          Waiting until restore process finishes...
      Error: Command server:restore failed. Error log: /home/flacatusu/.cache/crwctl/error.log. CodeReady Workspaces logs: /tmp/crwctl-logs/1632915650791.
          at newError (~/Documents/sources_s/codeready-workspaces-chectl/src/util.ts:203:17)
          at Object.wrapCommandError (~/Documents/sources_s/codeready-workspaces-chectl/src/util.ts:199:10)
          at Restore.<anonymous> (~/Documents/sources_s/codeready-workspaces-chectl/src/commands/server/restore.ts:78:18)
          at Generator.throw (<anonymous>)
          at rejected (~/Documents/sources_s/codeready-workspaces-chectl/src/commands/server/restore.ts:17:65)
      
      

      The problem maybe is when crwctl is trying to read `crwctl-backup-repository-password` in base 64 and is comparing with decoded string.
      https://github.com/redhat-developer/codeready-workspaces-chectl/blob/crw-2-rhel-8/src/api/backup-restore.ts#L247

      Attachments

        Issue Links

          Activity

            People

              abazko Anatolii Bazko
              flacatus Flavius Lacatusu
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: