From 28cefabe617a2cb32e7efcc1f283a5f24dd5cb69 Mon Sep 17 00:00:00 2001 From: Georg Date: Wed, 21 Jul 2021 13:33:34 +0200 Subject: Initial Cron Run Signed-off-by: Georg --- cron/cron.d/certbot | 4 ++++ cron/cron.d/mirror | 3 +++ cron/cron.d/restic_orpheus | 9 +++++++++ cron/cron.d/restic_selene | 10 ++++++++++ cron/cron.d/restic_theia | 9 +++++++++ cron/cron.daily/beauties-cleanup.sh | 6 ++++++ 6 files changed, 41 insertions(+) create mode 100644 cron/cron.d/certbot create mode 100644 cron/cron.d/mirror create mode 100644 cron/cron.d/restic_orpheus create mode 100644 cron/cron.d/restic_selene create mode 100644 cron/cron.d/restic_theia create mode 100644 cron/cron.daily/beauties-cleanup.sh diff --git a/cron/cron.d/certbot b/cron/cron.d/certbot new file mode 100644 index 0000000..39c9720 --- /dev/null +++ b/cron/cron.d/certbot @@ -0,0 +1,4 @@ +SHELL=/bin/sh +MAILTO=system@lysergic.dev + +0 0,12 * * * certbot sleep 1960 && /opt/certbot/certbot-venv/bin/certbot renew -q diff --git a/cron/cron.d/mirror b/cron/cron.d/mirror new file mode 100644 index 0000000..1ad81d1 --- /dev/null +++ b/cron/cron.d/mirror @@ -0,0 +1,3 @@ +SHELL=/bin/sh + +0 2 * * * mirror /mnt/gluster01/mirror/meta/slackware.sh diff --git a/cron/cron.d/restic_orpheus b/cron/cron.d/restic_orpheus new file mode 100644 index 0000000..ca1ab51 --- /dev/null +++ b/cron/cron.d/restic_orpheus @@ -0,0 +1,9 @@ +# Cronjob for Restic Backup to S3 +# Created and last modified: 20/07/2021 +# georg@lysergic.dev + +MAILTO=system +SHELL=/bin/sh + +#This will make a deduplicating backup every day at 22:00 and send an email to system@lysergic.dev as well as #universe +0 22 * * * restic /opt/restic/run.sh |& mail -s "S3 Backup - $(hostname -f) - $(date)" ircsystem diff --git a/cron/cron.d/restic_selene b/cron/cron.d/restic_selene new file mode 100644 index 0000000..2177e7f --- /dev/null +++ b/cron/cron.d/restic_selene @@ -0,0 +1,10 @@ +# Cronjob for Restic Backup to S3 +# Created and last modified: 20/07/2021 +# georg@lysergic.dev + +MAILTO=system +SHELL=/bin/sh + +#This will make a deduplicating backup every day at 21:00 and send an email to system@lysergic.dev as well as #universe +0 21 * * * restic /opt/restic/run.sh |& mail -s "S3 Backup - $(hostname -f) - $(date)" ircsystem + diff --git a/cron/cron.d/restic_theia b/cron/cron.d/restic_theia new file mode 100644 index 0000000..a7856f2 --- /dev/null +++ b/cron/cron.d/restic_theia @@ -0,0 +1,9 @@ +# Cronjob for Restic Backup to S3 +# Created and last modified: 20/07/2021 +# georg@lysergic.dev + +MAILTO=system +SHELL=/bin/sh + +#This will make a deduplicating backup every day at 23:00 and send an email to system@lysergic.dev as well as #universe +0 23 * * * restic /opt/restic/run.sh |& mail -s "S3 Backup - $(hostname -f) - $(date)" ircsystem diff --git a/cron/cron.daily/beauties-cleanup.sh b/cron/cron.daily/beauties-cleanup.sh new file mode 100644 index 0000000..d6c83a4 --- /dev/null +++ b/cron/cron.daily/beauties-cleanup.sh @@ -0,0 +1,6 @@ +#!/bin/sh +BEFORE=$(du -h /opt/beauties/data/storage) +echo "#universe +++ $BEFORE - Starting cleanup ..." | nc -N 127.0.0.2 2424 +find /opt/beauties/data/storage/* -mtime +60 -exec rm {} \; | nc -N 127.0.0.2 2424 +AFTER=$(du -h /opt/beauties/data/storage) +echo "#universe +++ $AFTER - Cleanup complete." | nc -N 127.0.0.2 2424 -- cgit v1.2.3