Closed jackyhome0801 closed 6 years ago
Hi @jackyhome0801 . What you're seeing is the expected behavior of Consul. Anti-Entropy is responsible for this. An agent is the ultimate source of truth with respect to services, for a system. So, you'd have to re-register the service/s on that agent to register them to the catalogue, once again.
first, i register some services via /v1/agent/service/register API and put some key/values data in then i take "consul snapshot save backup.snap" command to get a snapshot file next, i stop consul agent and delete consul data directory to remove all consul data lastly, i start consul agent again and take "consul snapshot restore backup.snap" to restore data back
i found that key/values data can be restored, but unfortunately, services can't be restored when i query services via /v1/agent/services i also noticed that i can get services via /v1/catalog/services, but only last for seconds, soon or later, a deregister will be triggered and services will disappear for ever