Not able to restore buckets containing dots in the bucket name on windows clients

Hello team,

We are not able to restore buckets containing dots in the bucket name on windows clients.
Tried below possibilities to escape dots but in vain.

Can you please help us here?

Regards,
Sruthi Maddileti.

Periods in a bucket are not illegal, but when used as part of a collection specifier, the bucket name would have to be escaped (as a period is the separator between bucket and scope and collection. You might try escaping with back-tics.

1 Like

Which version are you using?

  --map-buckets a\.b=a\.b\.c

should work…

I’ve tested with 7.0.2, 7.0.4, 7.0.5 & 7.1.3 successfully. This is the 7.1.3 test:

E:\>couchbase-cli bucket-create -c localhost -u Administrator -p password --bucket a.b --bucket-type couchbase --bucket-ramsize 100 --bucket-replica 0
SUCCESS: Bucket created

E:\>curl -su Administrator:password http://localhost:8093/query/service -d "statement=insert into `a.b` values('k0',{})"
{
"requestID": "e83e362b-736a-4ed7-8e87-5b6dca5bc956",
"signature": null,
"results": [
],
"status": "success",
"metrics": {"elapsedTime": "42.9312ms","executionTime": "42.9312ms","resultCount": 0,"resultSize": 0,"serviceLoad": 6,"mutationCount": 1}
}

E:\>cbbackupmgr config -a e:\backup -r example --include-data a\.b
Backup repository `example` created successfully in archive `e:\backup`

E:\>cbbackupmgr backup -a e:\backup -r example -c couchbase://127.0.0.1 -u Administrator -p password
Backing up to '2023-02-03T10_40_14.9785438Z'
Copied all data in 8.154s (Avg. 3.51KiB/Sec)                                                                                  1 items / 28.10KiB
[======================================================================================================================================] 100.00%

| Transfer
| --------
| Status    | Avg Transfer Rate | Started At                      | Finished At                     | Duration |
| Succeeded | 3.51KiB/s         | Fri, 03 Feb 2023 10:40:14 +0000 | Fri, 03 Feb 2023 10:40:23 +0000 | 8.176s   |

| Bucket
| ------
| Name | Status    | Transferred | Avg Transfer Rate | Started At                      | Finished At                     | Duration |
| a.b  | Succeeded | 28.10KiB    | 7.02KiB/s         | Fri, 03 Feb 2023 10:40:18 +0000 | Fri, 03 Feb 2023 10:40:23 +0000 | 4.325s   |
|
| Mutations                    | Deletions                    | Expirations                  |
| ---------                    | ---------                    | -----------                  |
| Received | Errored | Skipped | Received | Errored | Skipped | Received | Errored | Skipped |
| 1        | 0       | 0       | 0        | 0       | 0       | 0        | 0       | 0       |

Backup completed successfully

E:\>cbbackupmgr restore --archive e:\backup --repo example -c couchbase://127.0.0.1 -u Administrator -p password --auto-create-buckets --force-updates --map-buckets a\.b=a\.b\.c
Warning: --map-buckets is deprecated, use -/--map-data
Restoring backup '2023-02-03T10_40_14.9785438Z'
Copied all data in 8.272s (Avg. 3.51KiB/Sec)                                                                                  1 items / 28.10KiB
[======================================================================================================================================] 100.00%

| Transfer
| --------
| Status    | Avg Transfer Rate | Started At                      | Finished At                     | Duration |
| Succeeded | 3.51KiB/s         | Fri, 03 Feb 2023 10:41:17 +0000 | Fri, 03 Feb 2023 10:41:25 +0000 | 8.275s   |

| Bucket
| ------
| Source | Sink  | Status    | Transferred | Avg Transfer Rate | Started At                      | Finished At                     | Duration |
| a.b    | a.b.c | Succeeded | 28.10KiB    | 28.10KiB/s        | Fri, 03 Feb 2023 10:41:25 +0000 | Fri, 03 Feb 2023 10:41:25 +0000 | 51ms     |
|
| Mutations                    | Deletions                    | Expirations                  |
| ---------                    | ---------                    | -----------                  |
| Received | Errored | Skipped | Received | Errored | Skipped | Received | Errored | Skipped |
| 1        | 0       | 0       | 0        | 0       | 0       | 0        | 0       | 0       |

Restore completed successfully

E:\>cbc cat -u Administrator -P password -U couchbase://localhost/a.b.c k0
k0                   CAS=0x17404a6b26620000, Flags=0x0, Size=2, Datatype=0x01(JSON)
{}

HTH.

2 Likes

Thanks a lot for the help. It works.