【发布时间】:2015-07-16 08:12:58
【问题描述】:
我正在尝试通过 API 更改 Couchbase 服务器的压缩设置。具体来说,我想设置压缩可以运行的时间窗口。通过 Web 控制台执行此操作很简单,但我需要通过脚本执行此操作,但我无法弄清楚语法。我可以更改其他值,例如清除间隔:
curl -u <adminuser>:<password> -d 'parallelDBAndViewCompaction=false&purgeInterval=3' <IP>:8091/controller/setAutoCompaction
但是 allowedTimePeriod 的值会被忽略。有没有人能让这个工作?
编辑
搞定了,谢谢!
您必须给出所有五个值和 parallelDBandView 值:
curl -u admin:password -d 'parallelDBAndViewCompaction=false&allowedTimePeriod[fromHour]=0&allowedTimePeriod[fromMinute]=0&allowedTimePeriod[toHour]=2&allowedTimePeriod[toMinute]=0&allowedTimePeriod[abortOutside]=false' ip:8091/controller/setAutoCompaction
【问题讨论】:
标签: couchbase