From 08e3b1b6626621091849144e2706ff63cf77ab04 Mon Sep 17 00:00:00 2001 From: Gorden Mende Date: Thu, 28 Oct 2021 17:51:51 +0200 Subject: [PATCH] saving uncommitted changes in /etc prior to apt run --- .etckeeper | 1 + cron.weekly/restic-prune | 3 +++ crontab | 9 +++++---- init.d/firewall | 2 +- 4 files changed, 10 insertions(+), 5 deletions(-) create mode 100755 cron.weekly/restic-prune diff --git a/.etckeeper b/.etckeeper index 27cbb7a8..847d020b 100755 --- a/.etckeeper +++ b/.etckeeper @@ -608,6 +608,7 @@ maybe chmod 0644 'cron.weekly/.placeholder.disabled' maybe chmod 0755 'cron.weekly/debsums' maybe chmod 0755 'cron.weekly/dh-dovecot' maybe chmod 0755 'cron.weekly/man-db.disabled' +maybe chmod 0755 'cron.weekly/restic-prune' maybe chmod 0755 'cron.weekly/rkhunter' maybe chmod 0600 'crontab' maybe chmod 0755 'cruft' diff --git a/cron.weekly/restic-prune b/cron.weekly/restic-prune new file mode 100755 index 00000000..85f503b2 --- /dev/null +++ b/cron.weekly/restic-prune @@ -0,0 +1,3 @@ +#!/bin/sh +# prunes backup repos and rebuilds them +/usr/bin/restic -r /backup/restic-repo prune --password-file /root/.restic diff --git a/crontab b/crontab index 6abdecb7..8712221d 100644 --- a/crontab +++ b/crontab @@ -23,8 +23,9 @@ PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin #*/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 1 * * * root /usr/local/bin/restic -r /backup/restic-repo backup /var/opt/vmail --password-file /root/.restic -15 1 * * * root /usr/local/bin/restic -r /backup/restic-repo backup /var/www --password-file /root/.restic -#0 1 * * * root /usr/local/bin/restic -r /backup/restic-repo backup /var/opt/vmail --password-file /root/.restic -30 1 * * * root /usr/local/bin/restic -r /backup/restic-repo forget --keep-daily 7 --keep-weekly 2 --prune --password-file /root/.restic +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 +30 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/euve130167/ diff --git a/init.d/firewall b/init.d/firewall index 5c9a4f96..6335920e 100755 --- a/init.d/firewall +++ b/init.d/firewall @@ -19,7 +19,7 @@ BLACKLIST=/usr/local/etc/blacklist.txt #trigger for your ports #IN_ALLOWED_TCP="21 22 25 53 80 443 465 993 995 2812 10024 10025 64738" IN_ALLOWED_TCP="22 25 53 80 443 587 993 1024:65535" -OUT_ALLOWED_TCP="22 25 53 80 443 587 993 2703 1024:65535" +OUT_ALLOWED_TCP="22 25 53 80 443 587 873 993 2703 1024:65535" IN_ALLOWED_UDP="53 64738" OUT_ALLOWED_UDP="53" IN_ALLOWED_ICMP=" "