Export/Import KVPs
Hi, I was wondering if there's any way to easily export the KVPs from one consul deployment and import it into another one? The scenario for this is, for example, when you have a big KVP store in your dev environment and you need to recreate it in another environment
+1 ... this has bitten in more than once. Would be nice to be able to export and import easily.
Hi @rtaborda there's https://github.com/leprechau/consul-backinator which is an open source tool that lets you do this. Also, some folks manage KVS in git and then push them in with tools like https://github.com/Cimpress-MCP/git2consul. If you have multiple datacenters, you can use https://github.com/hashicorp/consul-replicate to sync them. Hope that helps!
Thank you for your answer, I'll give them a try. But I still don't see why isn't there an export and import option in consul, it could just export the whole kvs as a big json file that then you could also import. This would make the process a lot more easier and user friendly.
I'll give your suggestion some thought as we look at a similar ticket related to backups.
See https://www.consul.io/docs/commands/kv/import.html and https://www.consul.io/docs/commands/kv/export.html as well as https://www.consul.io/docs/commands/snapshot.html.