1
0
Fork 0
mirror of https://github.com/SinTan1729/random.git synced 2024-12-27 05:28:37 -06:00
random/crontab-bk.sh

15 lines
369 B
Bash
Raw Normal View History

2022-06-26 22:34:06 -05:00
#!/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