Consul Remote Backup and Restore
Description of the Issue (and unexpected/desired result)
Consul remote backup and restore not working.
Reproduction steps
We have configured a single node server and configured some key values on the same.
I have followed the API snapshot provided in the document (https://www.consul.io/api/snapshot.html) and got snapshots using the same
snapshot command used curl http://192.168.0.11:8500/v1/snapshot?dc=west-aws-dev-ccp -o snapshot.tgz
snapshot file size du -sh * 496K snapshot.tgz
Extracted file size du -sh * 4.0K SHA256SUMS 4.0K meta.json 496K snapshot.tgz 1.9M state.bin
Restore command used curl --request PUT --data-binary snapshot.tgz http://192.168.0.13:8500/v1/snapshot
Command Output: failed to decompress snapshot: gzip: invalid header
Error in consul log, 2018/04/18 23:47:47 [ERR] http: Request PUT /v1/snapshot, error: failed to decompress snapshot: gzip: invalid header from=192.168.0.13:57310
Could you please let us know how can we fix this issue?
consul version for both Client and Server
Client: v0.8.5
Server: v0.8.5
Client & Server:
Single node server
Operating system and Environment details
RHEL 7.4
From the doc link, during the PUT, should there be an ~~ampersand~~~ at "@" before the filename?
Awesome it worked well.
Is there anyway to select any particular KV on snapshot backup? As of now this will back up all the data available on the consul cluster and I would like to backup particular KV only.
@shantanugadgil , Could you please provide an update on this? "Is there anyway to select any particular KV on snapshot backup? "
@johnakash I don't know. I don't know if Consul even has such a feature.
BTW, I think for general questions, it would be better to use the Consul Google Group rather than create github issues.
Regards, Shantanu
EDIT: This does indeed seemed to be cross-posted on the group as well as here. :|
Agree this is better suited for the mailing list.
Is there anyway to select any particular KV on snapshot backup? As of now this will back up all the data available on the consul cluster and I would like to backup particular KV only.
Not at this time, no. You can use KV APIs to achieve specific migrations or backup/restore operations against paths.