updated readme.

This commit is contained in:
Adam Rabjerg
2021-03-22 20:26:48 +01:00
parent cc4aef7f85
commit f21e9f70f5

View File

@@ -75,3 +75,34 @@ Todo
Todo Todo
### etc/systemd/system/make-backup.service
Systemd service to make backup.
WorkingDirectory should be the absolute path to where make_backup.sh script is located.
ExecStart *MUST* be the absolute path to make_backup.sh
### etc/systemd/system/make-backup.timer
Systemd timer to trigger backup.
When backups are made is defined in the line:
```OnCalendar=Mon-Sun *-*-* 04:00:00```
See ```man systemd.time``` for more how to configure OnCalendar events.
### Systemd service+timer install
Configure the trigger in the .timer, remember to change "Description" in both .service and .timer.
```systemd-analyze verify make-backup.*```
Have systemd verify that the files are correct before continueing.
If there is any errors, FIX THOSE FIRST!
```cp make-backup.* /etc/systemd/system/.```
Copy the files to /etc/systemd/system.
```systemctl daemon-reload```
Have systemd track the files you just added.
```systemctl start make-backup.service```
Trigger the backup via systemd to verify that everything is working as expected.
```systemctl enable make-backup.timer --now```
If the .service works and makes backups as wanted you can now enable the .timer.
DONE!!