I’ll try to provide some more information:
Our Vault config.json:
{
"listener": {
"tcp": {
"address": "0.0.0.0:8200",
"tls_disable": "false",
"tls_cert_file": "/path/to/cert/file",
"tls_key_file": "/path/to/key/file"
}
},
"backend": {
"raft": {
"path": "/vault/raft",
"node_id": "raft_node_1"
}
},
"seal": {
"azurekeyvault" : {
//auto unseal information
}
},
"default_lease_ttl": "168h",
"max_lease_ttl": "0h",
"api_addr": "https://0.0.0.0:8200",
"cluster_address": "https://127.0.0.1:8201",
"cluster_addr": "https://127.0.0.1:8201",
"ui": true
}
With this config I can use Vault normally without errors.
Currently, I have several k/v v2 secret engines. For testing purposes, I created some secrets in one of them.
Then I use following CLI command to create a snapshot:
vault operator raft snapshot save raft.snap
This creates the file raft.snap
I then create a new version of a secret by removing one k/v-pair
Then I want to use the following CLI command to restore the previous state:
vault operator raft snapshot restore raft.snap
The command runs without error.
The vault then is sealed (auto-unseal doesn’t seem to work with a snapshot) so I just restart the vault server with
vault server -config=config.json
I would then expect that the one secret where I created the new version is restored to the previous version but that isn’t the case.
Same happens if I try to permanantly delete a secret. The restore command does not restore any data.
As I mentioned, we only have one instance of Vault server running. No HA or anything like that.
What am I doing wrong?
Thanks for the help
Regards