Compare commits
2 Commits
master
...
solution_p
| Author | SHA1 | Date | |
|---|---|---|---|
| 0bd56bc7be | |||
| 8f2be4d638 |
16
Readme.md
16
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
|
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
|
## 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
|
||||||
|
```
|
||||||
6
pkg_list.service
Normal file
6
pkg_list.service
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
[Unit]
|
||||||
|
Description = get installed packages list
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type = oneshot
|
||||||
|
ExecStart = {{ pkg_list_command }} | sort > /root/pkg.list
|
||||||
6
pkg_list.timer
Normal file
6
pkg_list.timer
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
[Unit]
|
||||||
|
Description= get weekly package list
|
||||||
|
[Timer]
|
||||||
|
OnCalendar=Mon 05:00:00
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
Reference in New Issue
Block a user