From 30d1610aba1a2d65dace30fb43b945bdda1da5a0 Mon Sep 17 00:00:00 2001 From: eoli3n Date: Wed, 13 May 2020 18:27:32 +0200 Subject: [PATCH] added backup timer --- roles/borgbackup/files/backup.timer | 9 +++++++++ roles/borgbackup/tasks/main.yml | 5 +++++ 2 files changed, 14 insertions(+) diff --git a/roles/borgbackup/files/backup.timer b/roles/borgbackup/files/backup.timer index e69de29..4ce59e0 100644 --- a/roles/borgbackup/files/backup.timer +++ b/roles/borgbackup/files/backup.timer @@ -0,0 +1,9 @@ +[Unit] +Description=Backup dayly + +[Timer] +OnCalendar=daily +Persistent=true + +[Install] +WantedBy=timers.target diff --git a/roles/borgbackup/tasks/main.yml b/roles/borgbackup/tasks/main.yml index 37b6a48..9e43d89 100644 --- a/roles/borgbackup/tasks/main.yml +++ b/roles/borgbackup/tasks/main.yml @@ -9,3 +9,8 @@ src: backup.sh.secret dest: /root/scripts/backup.sh mode: 0700 + +- name: copy backup timer + copy: + src: backup.timer + dest: /etc/systemd/system/