【问题标题】:Replicating a remote database from Bluemix从 Bluemix 复制远程数据库
【发布时间】:2017-05-09 10:58:26
【问题描述】:

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

$USERNAME、$PASSWORD、$REMOTE_USERNAME 的值是多少?

当前的 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 复制远程数据库的示例。

【问题讨论】:

    标签: ibm-cloud cloudant


    【解决方案1】:

    如果您想从远程目标复制到本地数据库,您的数据库 URL 将是:

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

    例如

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

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


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

    【讨论】:

    • @Olivia :有一段时间没有尝试过,但还有一个 Cloud Foundry CLI 插件 (github.com/ibmjstart/bluemix-cloudant-replicator) 可能对您有用。
    • 非常感谢!克里斯雪。
    • Np。如果这对你有用,奥利维亚,请接受答案,点赞也不错:)
    猜你喜欢
    • 2018-05-18
    • 1970-01-01
    • 1970-01-01
    • 2016-04-04
    • 2012-09-02
    • 2016-02-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多