Finished backup-to-swappable draft

This commit is contained in:
2023-04-26 22:12:40 +02:00
parent 6a4dea3582
commit 7eed695623
40 changed files with 115 additions and 37 deletions

View File

@@ -0,0 +1 @@
ACTION=="add", KERNEL=="sd[a-z]", ENV{ID_SERIAL_SHORT}=="{{backup_to_swappable_serial_short}}", RUN+="systemctl start backup-to-swappable.service"

View File

@@ -0,0 +1,7 @@
[Unit]
Description=backing up data
OnFailure=systemd-email@%n.service
[Service]
Type=oneshot
ExecStart=/usr/bin/bash {{backup_to_swappable_script_path}}

View File

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