从Bluemix复制远程数据库

时间:2017-05-09 10:58:27

标签: ibm-cloud cloudant

数据库网址:    HTTPS:// $ USERNAME:$PASSWORD@$REMOTE_USERNAME.Cloudant.com/$DATABASE_NAME

$ USERNAME,$ PASSWORD,$ REMOTE_USERNAME的价值是多少? enter image description here

enter image description here

当前的Cloudant帐户:

VCAP_SERVICES
{
    "cloudantNoSQLDB": [
        {
            "credentials": {
                "username": "c39cexxx-bluemix",
                "password": "xxxxxxx",
                "host": "c39cexxx-bluemix.cloudant.com",
                "port": 443,
                "url": "https://c39cexxx-bluemix:xxxxxxx@c39cexxx-bluemix.cloudant.com"
            },  
        }
    ]
}


The other Cloudant accounts in a database
VCAP_SERVICES
{
    "cloudantNoSQLDB": [
        {
            "credentials": {
                "username": "f39c4xxx-bluemix",
                "password": "xxxxxxx",
                "host": "f39c4xxx-bluemix.cloudant.com",
                "port": 443,
                "url": "https://f39c4xxx-bluemix:xxxxxxx@f39c4xxx-        bluemix.cloudant.com"
            },  
        }
    ]
}

请举例说明从Bluemix复制远程数据库。

1 个答案:

答案 0 :(得分:1)

如果要从远程目标复制到本地数据库,则数据库URL将为:

https://$remote_username:$remote_password@$remote_username.cloudant.com/$remote_database

E.g。

https://f39c45g0-bluemix:0ebdc6c7@f39c45g0-bluemix.cloudant.com/the_remote_database

您可以在此处找到更多信息:https://developer.ibm.com/clouddataservices/cloudant-replication/

注意 :我假设您没有发布实际凭据,如果您这样做,至少应该更改密码。