vault-migrator
vault-migrator copied to clipboard
Migration to and from filesystem can have issues with underscores
I have vault backed by consul which I am migrating to filesystem for backup purposes.
If my vault kv has a key named foo
and a folder named _foo
... both want to become _foo
on the filesystem so I get a _foo is a directory
error when running vault-migrator.
Since vault is okay with foo
and _foo
, is there some way to configure the consul file
backend to make it handle this case? Do you have any advice that isn't: "don't do that, silly!" :-)
My config.json for vault-migrator --config config.json
:
$ cat backup.json
{
"to": {
"name": "file",
"config": {
"path": "/Users/jar349/projects/vault-backups/data"
}
},
"from": {
"name": "consul",
"config": {
"address": "localhost:8500",
"path": "vault/"
}
}
}
hi @jar349, not much to say. my only suggestion is to name differently keys and folders. is unfortunate that you have that issue, the script only has a job to copy the keys. unfortunately, I have not much time available to fix any incompatibility between backends.
In your opinion, where should a fix for this be made? Here, or in the consul file
backend implementation?