diff --git a/bindata/etcd/cluster-backup-pod.yaml b/bindata/etcd/cluster-backup-pod.yaml index e06044817..4931c5233 100644 --- a/bindata/etcd/cluster-backup-pod.yaml +++ b/bindata/etcd/cluster-backup-pod.yaml @@ -37,8 +37,7 @@ spec: if [ -n "${DELETE_BACKUP_DIR}" ]; then echo "removing all backups in ${DELETE_BACKUP_DIR}" - rm -rf "${DELETE_BACKUP_DIR}" - mkdir -p "${DELETE_BACKUP_DIR}" + rm -rf "${DELETE_BACKUP_DIR}/*" fi /usr/local/bin/cluster-backup.sh --force ${CLUSTER_BACKUP_PATH} diff --git a/pkg/operator/etcd_assets/bindata.go b/pkg/operator/etcd_assets/bindata.go index 8918b44b3..0355993b9 100644 --- a/pkg/operator/etcd_assets/bindata.go +++ b/pkg/operator/etcd_assets/bindata.go @@ -385,8 +385,7 @@ spec: if [ -n "${DELETE_BACKUP_DIR}" ]; then echo "removing all backups in ${DELETE_BACKUP_DIR}" - rm -rf "${DELETE_BACKUP_DIR}" - mkdir -p "${DELETE_BACKUP_DIR}" + rm -rf "${DELETE_BACKUP_DIR}/*" fi /usr/local/bin/cluster-backup.sh --force ${CLUSTER_BACKUP_PATH}