I am a newby to MarkLogic and Gradle. I am using Gradle build tool for my MarkLogic application. I would like to know how to configure backups with the help of Gradle, I know we can use the MarkLogic UI to do the same but I feel doing it with Gradle will help me understand the whole setup in more detail. Thank you for any help on this :)
1
votes
1 Answers
4
votes
If you're using ml-gradle - https://github.com/rjrudin/ml-gradle - then it's simply a matter of adding a database-backups block to your database configuration file. The contents of this block are specified in the MarkLogic Management REST API documentation for the databases endpoint - http://docs.marklogic.com/REST/PUT/manage/v2/databases/[id-or-name]/properties
If you're using Gradle but not ml-gradle, you can use any HTTP client to talk directly to the databases endpoint. One good choice is HTTPBuilder - https://github.com/jgritman/httpbuilder .