Compare commits
1 Commits
solution
...
master_pkg
| Author | SHA1 | Date | |
|---|---|---|---|
| d2bfa5a72e |
20
Readme.md
20
Readme.md
@@ -3,25 +3,11 @@
|
|||||||
|
|
||||||
## OldSchool with cron
|
## OldSchool with cron
|
||||||
|
|
||||||
Utiliser la commande tar pour faire une archive de votre répertoire personnel dans /var/backups
|
Mettre au point la commande permettant de récupérer la liste des paquets installés et de la stocker dans /root/pkg.list
|
||||||
|
|
||||||
Utiliser cron pour planifier cette tâche toutes les heures, du lundi au vendredi
|
Utiliser cron pour planifier cette tâche toutes les semaines, le lundi matin à 5h
|
||||||
|
|
||||||
```bash
|
|
||||||
cat /etc/crontab
|
|
||||||
15 * * * 1-5 root tar cpzf /var/backups/home/tgz /home/tom
|
|
||||||
```
|
|
||||||
|
|
||||||
## NewSchool with systemd timer
|
## NewSchool with systemd timer
|
||||||
|
|
||||||
Faire la même chose avec un timer systemd
|
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
|
|
||||||
```
|
|
||||||
Reference in New Issue
Block a user