add todoist backup job and role #194

Merged
mg merged 22 commits from todositb into master 2024-09-27 18:50:18 +02:00
5 changed files with 22 additions and 18 deletions
Showing only changes of commit 2943c3e025 - Show all commits

View file

@ -1,8 +0,0 @@
{{ file_header | default () }}
[Unit]
Description=Send a Mail in case of an error in sanoid.service.
[Service]
Type=oneshot
ExecStart=/bin/bash -c '/bin/systemctl status sanoid.service | mail -aFROM:sanoid@mgrote.net -s "[ERROR] sanoid - %H" {{ my_mail }}'

View file

@ -1,10 +0,0 @@
{{ file_header | default () }}
[Unit]
Description=Send zfs snapshots with sanoid/syncoid.
OnFailure=syncoid_mail.service
OnSuccess=syncoid_mail.service
[Service]
Type=simple
ExecStart=/usr/bin/syncoid.sh

View file

@ -0,0 +1,14 @@
{{ file_header | default () }}
[Unit]
Description=Create Todoist backups.
OnFailure=todoist_backup_mail.service
[Service]
Environment="TODOIST_TOKEN=geheim"
Type=oneshot
Restart=on-failure
RestartSec=10min
WorkingDirectory="/shares_backup/full-offline-backup-for-todoist"
ExecStart="python3 -m full_offline_backup_for_todoist --verbose download --with-attachments"

View file

@ -0,0 +1,8 @@
{{ file_header | default () }}
[Unit]
Description=Send a Mail in case of an error in todoist_backup.service.
[Service]
Type=oneshot
ExecStart=/bin/bash -c '/bin/systemctl status todoist_backup.service | mail -aFROM:todoist_backup@mgrote.net -s "[ERROR] todoist_backup" {{ my_mail }}'