#cat /data/backup/etcd/etcd-backup.sh

#!/bin/bash
bakpath=/data/backup/etcd
cd $bakpath
baktime=`date +%Y%m%d`
#备份当天数据
ETCDCTL_API=3 etcdctl --endpoints http://127.0.0.1:1159 \
snapshot save /data/backup/etcd/etcd-data-bak-${baktime}.db \
>>${bakpath}/etcd-backup.log
#清理半个月前数据
/usr/bin/find  $bakpath -name *.db -mtime +15 -exec rm -f {} \;





0 23 * * * sh /data/backup/etcd/etcd-backup.sh>/dev/null 2>&1


那就改成/apps目录
你们装的的机器是/data目录