Hashicorp Vault migration from storage type `file` to `raft`

I’m trying to migrate our Hashicorp Vault standalone with storage type file running in our RKE2 cluster to a Hashicorp Vault HA with storage type raft. But still getting some issues. We’re using the Helm chart version 0.22.0. So these are the steps I followed:

  1. Create a temporary Vault Raft running in RKE2 with 1 replica (don’t initialize vault)
  2. Exec into the old Vault container with the storage type file
  3. Go to the /vault/ folder and create a raft folder in it
  4. Run the command vault operator migrate --config migrate.hcl
    The migrate.hcl file looks like this:
storage_source "file" {
  path = "/vault/data/"

storage_destination "raft" {
  path = "/vault/raft/"
  node_id = "vault-raft-0"

  1. The migration is complete and it created a vault.db file into /vault/raft/ and a raft.db file into /vault/raft/raft/ including an empty folder called snapshots.
  2. Then I copied this whole /vault/raft/ folder to my local pc and copied it again to the temporary Vault Raft container. It has the same data storage mount path, so: /vault/raft/
  3. After copying the files I re-deployed the temporary Vault Raft since the pvc won’t be deleted and checked if it has still the copied .db files in it.
  4. In the end I tried to unseal it, but after running the third command Iit returns the following message: Error unsealing: context deadline exceeded

Am I doing something completely wrong?