From 655291269acbd712ebcabd706019a0838bb614b2 Mon Sep 17 00:00:00 2001 From: jgaunt Date: Sun, 22 Nov 2020 20:04:42 -0500 Subject: [PATCH] remove cron --- duplicacy/run.sh | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/duplicacy/run.sh b/duplicacy/run.sh index dc6165b..10532a0 100644 --- a/duplicacy/run.sh +++ b/duplicacy/run.sh @@ -26,10 +26,8 @@ sed --in-place 's~~'${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 \ No newline at end of file +# run the backup +/duplicacy -verbose -log backup -stats + +# run the clean up +find /backup/* -type f -name '*.tar' -mtime +${DAYS_TO_KEEP} -exec rm {} \; \ No newline at end of file