remove cron

This commit is contained in:
2020-11-22 20:04:42 -05:00
parent ef3bcaa1bf
commit 655291269a

View File

@@ -26,10 +26,8 @@ sed --in-place 's~<BACKUP_SERVER_PATH>~'${BACKUP_SERVER_PATH}'~' /.duplicacy/pre
# create the filters file
echo ${FILTERS} | jq -r '.[]' >> /.duplicacy/filters
# backup all the data using cron and then remove the
echo "${CRONTAB_RUN} /duplicacy -verbose -log backup -stats">> /etc/crontabs/root
echo "${CRONTAB_RUN} find /backup/* -type f -name '*.tar' -mtime +${DAYS_TO_KEEP} -exec rm {} \;" >> /etc/crontabs/root
crontab /etc/crontabs/root
crontab -l
# run the cron daemon in the forground
/usr/sbin/crond -f -l 1 -L /dev/stdout
# run the backup
/duplicacy -verbose -log backup -stats
# run the clean up
find /backup/* -type f -name '*.tar' -mtime +${DAYS_TO_KEEP} -exec rm {} \;