(Die Seite wurde neu angelegt: „/etc/systemd/system/backup.timer <syntaxhighlight lang="BASH"> [Unit] Description=Run daily backup to Fabians NAS [Timer] OnCalendar=*-*-* 02:00:00 Persisten…“) |
Keine Bearbeitungszusammenfassung |
||
| Zeile 22: | Zeile 22: | ||
[Service] | [Service] | ||
Type=oneshot | Type=oneshot | ||
ExecStart=/ | ExecStart=/root/backup.sh | ||
User=root | User=root | ||
Aktuelle Version vom 28. Juli 2023, 15:45 Uhr
/etc/systemd/system/backup.timer
[Unit]
Description=Run daily backup to Fabians NAS
[Timer]
OnCalendar=*-*-* 02:00:00
Persistent=True
Unit=backup.service
[Install]
WantedBy=timers.target
/etc/systemd/system/backup.service
[Unit]
Description=Copy files to Fabians NAS
Wants=backup.timer
[Service]
Type=oneshot
ExecStart=/root/backup.sh
User=root
[Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl start backup.timer
sudo systemctl enable backup.timer
sudo systemctl list-timers --all