diff --git a/clusters/cl01tl/helm/talos/templates/config.yaml b/clusters/cl01tl/helm/talos/templates/config.yaml index 04d790dea..037570f7f 100644 --- a/clusters/cl01tl/helm/talos/templates/config.yaml +++ b/clusters/cl01tl/helm/talos/templates/config.yaml @@ -22,8 +22,8 @@ data: echo ">> Backups prior to '$DATE_RANGE' will be removed"; echo ""; - FILES=$(s3cmd ls --no-check-certificate ${BUCKET}/cl01tl/etcd/ | - awk -v file_match="$FILE_MATCH" '$4 < file_match {print $4}'); + FILES=$(s3cmd ls --no-check-certificate "${BUCKET}/cl01tl/etcd/" | \ + awk -v file_match="$FILE_MATCH" '$4 < file_match && $4 !~ /\/$/ {print $4}') if [ $? -ne 0 ]; then echo "";