och-instance add-buckets
Adds bucket mapping of source bucket and destination bucket for object copying with object copier.
You can use the och-instance add-buckets command to add source and
destination buckets for object copying.
Syntax
- CLI
-
maprcli och-instance add-buckets -name copier name -srcbucket source bucket name -dstbucket destination bucket name [ -rulesFile path to a JSON file of AWS-style replication rules ({"rules":[...]}) for this source bucket; takes precedence over -dstbucket ]
- REST
-
Request Type POST Request URL http[s]://<host>:<port>/rest/och-instance/add-buckets?<parameters>
Parameters
| Parameter | Description |
|---|---|
name |
(Required)Name of the object copier |
srcbucket |
(Required) The name of the source bucket from which to copy data |
dstbucket |
(Required) The name of the destination bucket to which to copy data |
rulesFile |
(Optional) path to a JSON file of AWS-style replication rules that contain the rules to identify objects to copy from source bucket to destination bucket |
Examples
Example 1: Add source bucket 'srcbkt1' and destination bucket 'destbkt1' to copier 'tc2-cpochmultitest' to copy objects using rules specified in '/tmp/rules_for_bucket.json'
CLI
maprcli och-instance add-buckets -name ochmultitest -srcbucket srcbkt1 -dstbucket destbkt1 -json
{
"timestamp":1789080902381,
"timeofday":"2026-09-10 10:55:02.381 GMT+0000 PM",
"status":"OK",
"total":1,
"data":[
{
"message":"Added bucket mapping srcbkt1 -> destbkt1 to och-instance 'ochmultitest'"
}
]
}REST
curl -u <username> -X POST https://server.sj.us:8443/rest/och-instance/add-bucket?name="ochmultitest"&srcbucket="srcbkt1"&dstbucket="destbkt1"