From f21e9f70f5a3ce8ed6a25313dfb658b34588399e Mon Sep 17 00:00:00 2001 From: Adam Rabjerg Date: Mon, 22 Mar 2021 20:26:48 +0100 Subject: [PATCH] updated readme. --- README.MD | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/README.MD b/README.MD index b22a741..0111cc5 100644 --- a/README.MD +++ b/README.MD @@ -75,3 +75,34 @@ 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!! +