Skip to content

Commit

Permalink
feat(backup-config.yaml, backup.sh): add umask support in backup.sh a…
Browse files Browse the repository at this point in the history
…nd update dirname with iso name (#8)
  • Loading branch information
vmaillot authored Jul 12, 2021
1 parent 40d9d59 commit 6f05044
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backup-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ metadata:
name: backup-config
data:
OCP_BACKUP_SUBDIR: "/"
OCP_BACKUP_DIRNAME: "+etcd-backup-%F-%H-%M-%S"
OCP_BACKUP_DIRNAME: "+etcd-backup-%FT%T%:z"
OCP_BACKUP_EXPIRE_TYPE: "days"
OCP_BACKUP_KEEP_DAYS: "30"
OCP_BACKUP_KEEP_COUNT: "10"
OCP_BACKUP_UMASK: "0027"
3 changes: 3 additions & 0 deletions backup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@

set -xeuo pipefail

# set proper umask
umask "${OCP_BACKUP_UMASK}"

# validate expire type
case "${OCP_BACKUP_EXPIRE_TYPE}" in
days|count|never) ;;
Expand Down

0 comments on commit 6f05044

Please sign in to comment.