I am testing the scenario of a complete failure and recreation of both consul and vault. I understand consul supports multiple datacenters, but in the case where there is a complete loss of the consul and vault systems I am unable to get vault back online. The scenario is below.
Starting with a healthy consul and vault. I use python-consul to backup the vault key value store while the vault is sealed. This backup is a list of python dictionaries. The initial seal/unseal keys and root_token were also backed up at the time of vault initialization
I delete the "vault" top level folder in consul.
I destroy the server running vault.
I then run a small python script to replay the list of keys from the above backup into consul. That seems to work perfectly and consul now has a top level "vault" folder with "core" and "sys" subfolders. All key/values seem to be in place.
I then create a new vault server and start vault with config.hcl pointing to the correct consul backend endpoint.
I proceed to successfully unseal the vault with the keys backed up during initialization of the old and now destroyed vault system.
The problem is that the vault is unsealed and in standby mode. It cannot be utilized and cannot be sealed again as it is in standby mode. I understand that in production we would have multiple servers but again this is testing a complete loss and restore.
Thanks for any help provided.