This commit is contained in:
parent
302782fece
commit
e30439f039
@ -1,4 +1,6 @@
|
||||
FROM vault:1.13.3
|
||||
ENV VAULT_ADDR="http://active.vault.service.consul:8200"
|
||||
ENV RETENTION=30
|
||||
COPY vault-backup.sh /
|
||||
CMD ./vault-backup.sh
|
||||
VOLUME /backup
|
||||
|
10
Readme.md
10
Readme.md
@ -1,11 +1,21 @@
|
||||
# docker-vault-backup
|
||||
|
||||
perform a backup of vault raft base
|
||||
need an vautl approle authentification with following policie
|
||||
|
||||
```terraform
|
||||
rule {
|
||||
path = "sys/storage/raft/snapshot"
|
||||
capabilities = ["read"]
|
||||
}
|
||||
```
|
||||
|
||||
## ENV variable
|
||||
|
||||
- VAULT_APPROLEID
|
||||
- VAULT_SECRETID
|
||||
- RETENTION
|
||||
- VAULT_ADDR
|
||||
|
||||
## mount
|
||||
|
||||
|
@ -2,9 +2,6 @@
|
||||
export PATH_SNAPSHOT="/backup"
|
||||
export PATH_DIR="daily"
|
||||
export PATH_BACKUP=$PATH_SNAPSHOT"/"$PATH_DIR
|
||||
export VAULT_ADDR="http://active.vault.service.consul:8200"
|
||||
export RETENTION=30
|
||||
export ENV="0" # (0 = staging, 1 = production)
|
||||
export SNAPSHOT_FILE=$(date +%Y-%m-%d)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user