Hello, I am attempting to restore a vault backup snap file to a newly created vault instance to validate the backup files are intact and working as expected.
I am running into an issue where the manually create snap file will not restore over a fresh vault instance.
Details:
Vault Validation instance info:
Key Value
Seal Type shamir
Initialized true
Sealed false
Total Shares 5
Threshold 3
Version 1.6.2
Storage Type raft
Vault Backup source instance:
/ $ vault status
Key Value
Recovery Seal Type shamir
Initialized true
Sealed false
Total Recovery Shares 5
Threshold 3
Version 1.6.2
Storage Type raft
All vault instances run on k8s 1.19.15 infrastructure. One note, we use auto unseal for our clusters that are generating the backups. I am not sure if this would cause an issue with a fresh basic cluster used to validate the snap file.
When I copy the snap file generated using the following command:
vault operator raft snapshot save vault-snapshot-date +%F
.snap
to the fresh vault instance and attempt a restore with this command:
vault operator raft snapshot restore -force vault-snapshot-2022-06-08.snap
I get the following error in vault:
Error installing the snapshot: Error making API request.
URL: POST https://127.0.0.1:8200/v1/sys/storage/raft/snapshot-force
Code: 500. Errors:
- 1 error occurred:
- failed to read snapshot file: failed to read or write snapshot data: unexpected EOF
Of note, I am able to restore a much older snap file created prior to us moving to an auto unseal TSE model.
I am wondering is there is a way to test the snap file being created and what would likely cause the error seen above.
All k8s nodes run on CentOS7, kubelet 1.19.15, docker.