2017-05-09 53 views
1

数据库URL复制远程数据库: https://开头$ USERNAME:[email protected]$REMOTE_USERNAME.Cloudant.com/$DATABASE_NAME从Bluemix

什么是$ 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:[email protected]" 
      }, 
     } 
    ] 
} 


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:[email protected]  bluemix.cloudant.com" 
      }, 
     } 
    ] 
} 

请给复制从Bluemix远程数据库的一个例子。

回答

1

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

https://$remote_username:[email protected]$remote_username.cloudant.com/$remote_database 

例如

https://f39c45g0-bluemix:[email protected]/the_remote_database 

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


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

+0

@Olivia:有一段时间没有尝试过,但也有一个云代工CLI插件(https://github.com/ibmjstart/bluemix-cloudant-replicator),可能对您有用。 –

+0

非常感谢!克里斯雪。 – Olivia

+0

Np。如果这为你工作奥利维亚,请接受答案,upvote也会很好:) –