consul-snapshot is a backup and restore utility for Consul (https://www.consul.io). This is slightly different than some other utilities out there as this runs as a daemon for backups and ships them to S3. Also has integrated monitoring and backup health checks.
Apache License 2.0
116
stars
35
forks
source link
No keys are returned from KV when no prefix is specified #20
Using the 0.2.2 release, any attempts to backup the entire KV store failed to find any keys. Examining strace output from this process revealed that the api URL is "GET /v1/kv//?consistent=&recurse=". These URLs lead to redirects.
There is a fix that went into Consul API a few weeks after the 0.2.2 release that avoids a API redirect by removing the trailing slash from the key:
Using the 0.2.2 release, any attempts to backup the entire KV store failed to find any keys. Examining strace output from this process revealed that the api URL is "GET /v1/kv//?consistent=&recurse=". These URLs lead to redirects.
There is a fix that went into Consul API a few weeks after the 0.2.2 release that avoids a API redirect by removing the trailing slash from the key:
https://github.com/hashicorp/consul/commit/8c3db1c5c6007337ebe4cf5b0d45c0cbdd72f595
I downloaded consul-snapshot source and recompiled after patching the vendored consul/api to match, and using that build, the KV backup worked.
Is it possible to create a new release compiled against the newer version of the Consol API ? I believe that will fix this problem.