# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file
# and files in /etc/cron.d. These files also have username fields,
# that none of the other crontabs do.

SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

# m h dom mon dow user	command
57 * * * * root cd / && run-parts --report /etc/cron.hourly
36 1 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
44 2 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
53 3 3 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
#
10 3 * * * root /usr/bin/rkhunter --cronjob --update --quiet

#0 5 * * * root /bin/systemctl restart nginx

# DH parameter re-generation
@daily openssl dhparam -out /etc/myssl/dh4096.pem -2 4096

# databases backup
@daily /usr/local/bin/mysql-dump.sh

# cronjob for refreshing dyndns-IP
07,22,37,52 * * * * root /usr/local/bin/update-hosts.sh

#*/5 * * * * php-cli -f /var/www/vhosts/solusar.de/subdomains/nextcloud/cron.php
#0 0,12 * * * root /opt/certbot/bin/python -c 'import random; import time; time.sleep(random.random() * 3600)' && certbot renew -q
0 0,12 * * * root /usr/bin/certbot renew -q

0 1 * * * root /usr/bin/restic -r /backup/restic-repo backup /var/opt/vmail --password-file /root/.restic
15 1 * * * root /usr/bin/restic -r /backup/restic-repo backup /var/www --password-file /root/.restic
20 1 * * * root /usr/bin/restic -r /backup/restic-repo backup /etc --password-file /root/.restic
25 1 * * * root /usr/bin/restic -r /backup/restic-repo backup /var/log/redis --password-file /root/.restic
35 1 * * * root /usr/bin/restic -r /backup/restic-repo forget --keep-daily 7 --keep-weekly 2 --password-file /root/.restic

0 2 * * * root /usr/bin/rsync -a --password-file=/root/.rsync /backup/ Gorden@realm.solusar.de::NetBackup/netcup01/
