Compare commits

...

2 Commits

Author SHA1 Message Date
f82d1d491c added cronjob to prune unused docker stuff 2023-06-16 18:31:14 +02:00
408a78ebc0 borg check command angepasst 2023-06-16 17:55:10 +02:00
4 changed files with 17 additions and 3 deletions

View File

@@ -47,7 +47,7 @@ if [ "$mount_successful" -eq 1 ]; then
done done
# Backup-Integrität überprüfen # Backup-Integrität überprüfen
borg_check_result=$(borg check --last 7 "$backup_repository" 2>&1) borg_check_result=$(borg check --repository-only --max-duration 43200 "$backup_repository" 2>&1)
# Backup-Status und Speicherauslastung prüfen # Backup-Status und Speicherauslastung prüfen
if [ "$backup_status" -eq 0 ]; then if [ "$backup_status" -eq 0 ]; then

View File

@@ -48,7 +48,7 @@ if [ "$mount_successful" -eq 1 ]; then
done done
# Backup-Integrität überprüfen # Backup-Integrität überprüfen
borg_check_result=$(borg check --last 7 "$backup_repository" 2>&1) borg_check_result=$(borg check --repository-only --max-duration 43200 "$backup_repository" 2>&1)
# Backup-Status und Speicherauslastung prüfen # Backup-Status und Speicherauslastung prüfen
if [ "$backup_status" -eq 0 ]; then if [ "$backup_status" -eq 0 ]; then

View File

@@ -0,0 +1,5 @@
---
- name: Restart cron
ansible.builtin.service:
name: cron
state: restarted

View File

@@ -59,4 +59,13 @@
ansible.builtin.file: ansible.builtin.file:
path: /home/{{ system_user_name }}/docker/ path: /home/{{ system_user_name }}/docker/
state: directory state: directory
mode: '0755' mode: '0755'
- name: Create cronjob to prune unused docker stuff
ansible.builtin.cron:
user: "{{ system_user_name }}"
name: "prune unused docker stuff every night at 00:15"
minute: "15"
hour: "00"
job: "sudo docker system prune"
notify: Restart cron