Cbbackupmgr config commands

Hello Team,

if my bucket name contains dot in it the config command fails with following error
Backup repository creation failed: invalid collection string expected no more than three elements

Bucket name : test.name.travel.date.time

command : cbbackupmgs config --archive /dump --repo test.name.travel.date.time --include-buckets test.name.travel.date.time

Can you please help us here to check the error ?

Your bucket can contain a dot but your collection & scope can’t. So if you have:

bucket:     test.name.travel
scope:      date
collection: time

you can use:

'test\.name\.travel.date.time'

to escape and permit the dots in the bucket name. (Note I’m using single quotes to interact properly with my shell. An alternative is to escape the backslashes - test\\.name\\.travel.date.time.)

HTH.

my bucket name is only test.name.travel.date.time, which has no scope nor collections.
Can you please help here

You just need to escape all the dots:

'test\.name\.travel\.date\.time'

e.g.

$ cbbackupmgr config --archive /dump --repo 'test.name.travel.date.time' --include-buckets 'test\.name\.travel\.date\.time'
Warning: --include-buckets is deprecated, use -/--include-data
Backup repository `test.name.travel.date.time` created successfully in archive `/dump`

Check:

$ jq .include_data[].bucket /dump/test.name.travel.date.time/backup-meta.json
"test.name.travel.date.time"

HTH.

Hello, even if config command works the backup command is failing

/opt/couchbase/bin/cbbackupmgr backup --archive /jayesh1 --repo “repotest” -c localhost:8091 --username Admin --password *****

Backing up to ‘2022-11-07T14_43_45.2714244+05_30’
Transferring eventing metadata 0 items / 0B
[ ] 0.19%
Error backing up cluster: {
“name”: “ERR_REQUESTED_OP_FAILED”,
“code”: 55,
“description”: “Request operation failed”,
“attributes”: null,
“runtime_info”: {
“code”: 55,
“info”: “Malformed input filter test\.name\.travel\.date\.time”
}
}

Transfer
Status
Failed

What were your exact commands? And what’s your exact version? (cat /opt/couchbase/VERSION.txt)

My test:

$ cbbackupmgr config --archive /dump --repo 'test.name.travel.date.time' --include-buckets 'test\.name\.travel\.date\.time'
Warning: --include-buckets is deprecated, use -/--include-data
Backup repository `test.name.travel.date.time` created successfully in archive `/dump`
$ /opt/couchbase/bin/cbbackupmgr backup --archive /dump --repo "test.name.travel.date.time" -c localhost:8091 --username Administrator --password ******
Backing up to '2022-11-07T09_41_45.055891914Z'
Copied all data in 2.091s (Avg. 14.00KiB/Sec)                                                                     0 items / 28.00KiB
[==========================================================================================================================] 100.00%

| Transfer
| --------
| Status    | Avg Transfer Rate | Started At                      | Finished At                     | Duration |
| Succeeded | 14.00KiB/s        | Mon, 07 Nov 2022 09:41:45 +0000 | Mon, 07 Nov 2022 09:41:47 +0000 | 2.137s   |

| Bucket
| ------
| Name                       | Status    | Transferred | Avg Transfer Rate | Started At                      | Finished At                     | Duration |
| test.name.travel.date.time | Succeeded | 28.00KiB    | 28.00KiB/s        | Mon, 07 Nov 2022 09:41:45 +0000 | Mon, 07 Nov 2022 09:41:47 +0000 | 1.582s   |
|
| Mutations                    | Deletions                    | Expirations                  |
| ---------                    | ---------                    | -----------                  |
| Received | Errored | Skipped | Received | Errored | Skipped | Received | Errored | Skipped |
| 0        | 0       | 0       | 0        | 0       | 0       | 0        | 0       | 0       |

Backup completed successfully

Also, per my specific check using “jq”, you can see the “include_data” element field “bucket” in the backup-meta.json file configured contains the bucket name without backslashes. (The backslashes only being necessary for input to cbbackupmgr config.)

So confirm you configuration contains only the bucket name (with dots but no backslashes).

PFA the screenshot of commands i am running and also the version command

Thanks. [Edit: Could you confirm if this is Enterprise Edition or Community Edition too? - silly question given include is EE only; please ignore it.]

I reproduced the problem on 7.0.3-7031; I’ve also checked 7.1.2-3454 and it succeeds. I doubt there is a solution other than to upgrade I’m afraid.

(Edit: this commit - http://github.com/couchbase/eventing/commit/dff6ad00bfb6e346ed99ff9f78c269744e1e4c79 - addresses this.)

Thanks
Will try to upgrade and check it…

It is working on 7.1.x

Can you please point us to the bug details which is causing the backup failure? The link that you shared has no information about the bug or the related fix

Also can you please help with the escape characters to be given for special characters…

For example my bucket name is : test_1.2-3%4

The link I provided notes the MB numbers; they can be viewed at http://issues.couchbase.com. But there isn’t one that specifically addresses this though - what’s happened is the error reporting was refactored out preventing raising of the error. https://issues.couchbase.com/browse/MB-54451 will address this correctly in a future release.

You only need to escape the dot. So your term should be:

cbbackupmgr config --archive /dump --repo 'test' --include-data 'test_1\.2-3%4'

On checking the backup-meta.json you should then see:

...
  "include_data": [
    {
      "bucket": "test_1.2-3%4"
    }
...

HTH,