| 1 |
# One-shot: tells sandod to pull the latest prod backup. |
| 2 |
# Paired with sandod-backup-fetch.timer for daily execution. |
| 3 |
# |
| 4 |
# Place at /etc/systemd/system/sandod-backup-fetch.service on the Sando host. |
| 5 |
|
| 6 |
[Unit] |
| 7 |
Description=Sando: fetch latest prod backup |
| 8 |
After=sandod.service network-online.target |
| 9 |
Wants=network-online.target |
| 10 |
Requires=sandod.service |
| 11 |
|
| 12 |
[Service] |
| 13 |
Type=oneshot |
| 14 |
# Reuse the same env file the daemon does — gives us $SANDO_DAEMON. |
| 15 |
EnvironmentFile=/etc/sando/sando.env |
| 16 |
ExecStart=/usr/bin/curl -fsS --max-time 600 -X POST ${SANDO_DAEMON}/backup/fetch |
| 17 |
# Service exits non-zero if the daemon refuses; fine — we want the timer to |
| 18 |
# log + retry on the next cycle. Don't restart aggressively. |
| 19 |
|