This commit is contained in:
parent
302782fece
commit
e30439f039
@ -1,4 +1,6 @@
|
|||||||
FROM vault:1.13.3
|
FROM vault:1.13.3
|
||||||
|
ENV VAULT_ADDR="http://active.vault.service.consul:8200"
|
||||||
|
ENV RETENTION=30
|
||||||
COPY vault-backup.sh /
|
COPY vault-backup.sh /
|
||||||
CMD ./vault-backup.sh
|
CMD ./vault-backup.sh
|
||||||
VOLUME /backup
|
VOLUME /backup
|
||||||
|
10
Readme.md
10
Readme.md
@ -1,11 +1,21 @@
|
|||||||
# docker-vault-backup
|
# docker-vault-backup
|
||||||
|
|
||||||
perform a backup of vault raft base
|
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
|
## ENV variable
|
||||||
|
|
||||||
- VAULT_APPROLEID
|
- VAULT_APPROLEID
|
||||||
- VAULT_SECRETID
|
- VAULT_SECRETID
|
||||||
|
- RETENTION
|
||||||
|
- VAULT_ADDR
|
||||||
|
|
||||||
## mount
|
## mount
|
||||||
|
|
||||||
|
@ -2,9 +2,6 @@
|
|||||||
export PATH_SNAPSHOT="/backup"
|
export PATH_SNAPSHOT="/backup"
|
||||||
export PATH_DIR="daily"
|
export PATH_DIR="daily"
|
||||||
export PATH_BACKUP=$PATH_SNAPSHOT"/"$PATH_DIR
|
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)
|
export SNAPSHOT_FILE=$(date +%Y-%m-%d)
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user