From 8d2295c38bf3e7e8d386ef827321c4ab63f9cdb5 Mon Sep 17 00:00:00 2001 From: SinTan1729 Date: Sun, 26 Jun 2022 22:34:06 -0500 Subject: [PATCH] Added crontab-bk.sh --- crontab-bk.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 crontab-bk.sh diff --git a/crontab-bk.sh b/crontab-bk.sh new file mode 100644 index 0000000..80acfab --- /dev/null +++ b/crontab-bk.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +# this is a script to backup crontab data +# put this inside /etc/cron.daily + +# define location for output +DIR=/home/sintan/Documents/Backup/pkglists + +# make sure that the folder exists +mkdir -p $DIR + +ls /etc/cron.hourly/ /etc/cron.daily/ /etc/cron.weekly/ /etc/cron.monthly/ > $DIR/crontab +echo "-----------------" >> $DIR/crontab +crontab -l >> $DIR/crontab