From 8f2be4d6381eded5500e644ee3702cadd457abea Mon Sep 17 00:00:00 2001 From: Thomas Constans Date: Thu, 15 Apr 2021 23:09:55 +0200 Subject: [PATCH] solution --- Readme.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/Readme.md b/Readme.md index f215e94..669d85d 100644 --- a/Readme.md +++ b/Readme.md @@ -7,7 +7,21 @@ Utiliser la commande tar pour faire une archive de votre répertoire personnel d Utiliser cron pour planifier cette tâche toutes les heures, du lundi au vendredi +```bash +cat /etc/crontab +15 * * * 1-5 root tar cpzf /var/backups/home/tgz /home/tom +``` ## NewSchool with systemd timer -Faire la même chose avec un timer systemd \ No newline at end of file +Faire la même chose avec un timer systemd + +```bash +cat /etc/systemd/system/backup.timer +[Unit] +Description=hourly backup +[Timer] +OnCalendar=Mon-Fri *-*-* *:15:00 +[Install] +WantedBy=multi-user.target +``` \ No newline at end of file