Update container backups to Monthly instead of weekly

This commit is contained in:
iFargle 2023-12-31 11:42:44 +09:00
parent bf7db447f6
commit 055ba1ec02

View file

@ -7,15 +7,15 @@
''0 3 * * * root rsync -avr /Storage/Data/Docker/sysctl.io/nextcloud/html/data/albert/files/InstantUpload/ root@nuc-docker01:/Storage/Video/Pictures/InstantUpload/'' ''0 3 * * * root rsync -avr /Storage/Data/Docker/sysctl.io/nextcloud/html/data/albert/files/InstantUpload/ root@nuc-docker01:/Storage/Video/Pictures/InstantUpload/''
''0 5 * * * root rsync -avr /Storage/Data/Docker/sysctl.io/nextcloud/html/data/albert/files/Wallpapers/ root@nuc-docker01:/Storage/Video/Pictures/Wallpapers'' ''0 5 * * * root rsync -avr /Storage/Data/Docker/sysctl.io/nextcloud/html/data/albert/files/Wallpapers/ root@nuc-docker01:/Storage/Video/Pictures/Wallpapers''
# DERP relay certs # DERP relay certs
''@hourly root cp /Storage/Data/Docker/sysctl.io/letsencrypt/certs/certs/\*.sysctl.io.crt /Storage/Data/Docker/sysctl.io/letsencrypt/certs/certs/derp.sysctl.io.crt'' ''@daily root cp /Storage/Data/Docker/sysctl.io/letsencrypt/certs/certs/\*.sysctl.io.crt /Storage/Data/Docker/sysctl.io/letsencrypt/certs/certs/derp.sysctl.io.crt''
''@hourly root cp /Storage/Data/Docker/sysctl.io/letsencrypt/certs/private/\*.sysctl.io.key /Storage/Data/Docker/sysctl.io/letsencrypt/certs/private/derp.sysctl.io.key'' ''@daily root cp /Storage/Data/Docker/sysctl.io/letsencrypt/certs/private/\*.sysctl.io.key /Storage/Data/Docker/sysctl.io/letsencrypt/certs/private/derp.sysctl.io.key''
# Back up the docker containers weekly: # Back up the docker containers monthly:
''@weekly root ssh nuc-docker01 "rm -rf /Storage/Backups/Docker/sysctl.io/*"; for i in $(docker ps --format '{{.Names}}'); do docker export $i | gzip -cf | ssh root@nuc-docker01 "cat > /Storage/Backups/Docker/sysctl.io/$i.tar.gz"; done'' ''@monthly root ssh nuc-docker01 "rm -rf /Storage/Backups/Docker/sysctl.io/*"; for i in $(docker ps --format '{{.Names}}'); do docker export $i | gzip -cf | ssh root@nuc-docker01 "cat > /Storage/Backups/Docker/sysctl.io/$i.tar.gz"; done''
# Set a random Pi-Hole password # Set a random Pi-Hole password
''* * * * * root docker exec pihole sudo pihole -a -p $(openssl rand -hex 128)'' ''* * * * * root docker exec pihole sudo pihole -a -p $(openssl rand -hex 128)''
# Run the ClamAV scan # Run the ClamAV scan
''@monthly root /Storage/Data/docker-compose/sysctl.io/scripts/clamscan-cron.sh'' ''@monthly root /Storage/Data/docker-compose/sysctl.io/scripts/clamscan-cron.sh''
# Back up Loki logs monthly # Archive Loki logs monthly
''@monthly root /Storage/Data/docker-compose/sysctl.io/scripts/backup-logs.sh >> /Storage/Data/Temporary/log_backups.log'' ''@monthly root /Storage/Data/docker-compose/sysctl.io/scripts/backup-logs.sh >> /Storage/Data/Temporary/log_backups.log''
# Run the ClamAV scan # Run the ClamAV scan
''@monthly root /Storage/Data/docker-compose/sysctl.io/scripts/clamscan-cron.sh'' ''@monthly root /Storage/Data/docker-compose/sysctl.io/scripts/clamscan-cron.sh''