Skip to content

Instantly share code, notes, and snippets.

@derms
Last active March 25, 2019 10:54
Show Gist options
  • Save derms/f465afbd4627bc324d937a53fecdabfe to your computer and use it in GitHub Desktop.
Save derms/f465afbd4627bc324d937a53fecdabfe to your computer and use it in GitHub Desktop.
replica
* Documents
• App-Services
• Modules
• Schemas
• Triggers
• Security
curl --anyauth --user admin:XXXX -H "Content-Type: application/json" -X POST -d '{"forest-name": "Documents-replica-01","host": "myserver-02"}' http://localhost:8002/manage/v2/forests
curl --anyauth --user admin:XXXX -H "Content-Type: application/json" -X PUT -d '{"forest-replica":[{"replica-name": "Documents-replica-01", "host": "myserver-02"}]}' http://localhost:8002/manage/v2/forests/Documents/properties
export UP="admin:XXXX"
export HOST="myserver-02"
for db in Documents,App-Services,Modules,Schemas,Triggers,Security
do echo curl --anyauth --user $UP -H "Content-Type: application/json" -X PUT -d '{"forest-replica":[{"replica-name": "$db-replica-01", "host": "$HOST"}]}' http://localhost:8002/manage/v2/forests/$db/properties
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment