Continued draft development

This commit is contained in:
Kevin Veen-Birkenbach 2023-04-26 14:37:40 +02:00
parent 876bcbcc0c
commit 018c00f7b4
3 changed files with 19 additions and 1 deletions

View File

@ -4,3 +4,4 @@ This tool role allows to make an automatic backup to an usb stick
## More information ## More information
- https://unix.stackexchange.com/questions/67464/how-to-get-uuid-for-a-usb-drive - https://unix.stackexchange.com/questions/67464/how-to-get-uuid-for-a-usb-drive
- https://unix.stackexchange.com/questions/65891/how-to-execute-a-shellscript-when-i-plug-in-a-usb-device - https://unix.stackexchange.com/questions/65891/how-to-execute-a-shellscript-when-i-plug-in-a-usb-device
- https://askubuntu.com/questions/25071/how-to-run-a-script-when-a-specific-flash-drive-is-mounted

View File

@ -0,0 +1,7 @@
[Unit]
Description=delete old backups
OnFailure=systemd-email@%n.service
[Service]
Type=oneshot
ExecStart=/usr/bin/python {{docker_backups_cleanup}}backups-cleanup.py --backups-folder-path {{backups_folder_path}} --maximum-backup-size-percent {{size_percent_maximum_backup}}

View File

@ -0,0 +1,10 @@
[Unit]
Description=starts usb-auto-backup.service
[Timer]
OnCalendar={{on_calendar_usb_auto_backup}}
RandomizedDelaySec={{randomized_delay_sec}}
Persistent=true
[Install]
WantedBy=timers.target