Skip to content

Commit

Permalink
Update vault-backup.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
venkatamutyala authored Dec 10, 2023
1 parent 2952e6e commit 11b4481
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions vault-backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ export VAULT_TOKEN=$(vault write -field=token auth/kubernetes/login jwt=$SA_TOKE
mkdir -p /app/${date}
vault operator raft snapshot save /app/vault_${date}.snap;
datetime=$(date +"%Y%m%d_%H%M%S")
echo "Sleeping for 10 seconds in case any debugging needs to be done"
sleep 10;
s3_destination=${S3_BUCKET_NAME}/${CAPTAIN_DOMAIN}/hashicorp-vault-backups/${date}/vault_${datetime}.snap
aws s3 cp /app/vault_${date}.snap s3://${s3_destination}
unset VAULT_TOKEN
Expand Down

0 comments on commit 11b4481

Please sign in to comment.