Reorganize the content of the vault¶
vault-cli
has a few commands to help you move secrets around and reorganize the
content of the vault.
Copy secrets and folders¶
$ vault-cli set a b=c
$ vault-cli cp a d/e
Copy 'a' to 'd/e'
vault-cli cp
follows the safe-write
parameter (see Avoid overwriting secrets by accident) and
has a --force
flag, like vault-cli set
.
Move secrets and folders¶
$ vault-cli set a b=c
$ vault-cli mv a d/e
Move 'a' to 'd/e'
vault-cli mv
follows the safe-write
parameter (see Avoid overwriting secrets by accident) and
has a --force
flag, like vault-cli set
.
Delete a secret¶
$ vault-cli delete d
Done
Delete everything under blob-secret¶
vault-cli delete-all
lets you recursively delete paths. If no path is given,
all secrets are deleted (following the base-path
option, see Access a special folder easily)
By default, vault-cli delete-all
will ask for confirmation for every secret.
$ vault-cli delete-all blob-secret
Use --force
to bypass confirmation. Triple-check your command before you hit
enter
.
$ vault-cli delete-all --force