Skip to content

Commit 1255756

Browse files
committed
Makefile should enable timers
1 parent 84050b0 commit 1255756

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,9 @@ systemd:
3434
install src/zfs-auto-snapshot.8 $(DESTDIR)$(PREFIX)/share/man/man8/zfs-auto-snapshot.8
3535
install -d $(DESTDIR)$(PREFIX)/sbin
3636
install src/zfs-auto-snapshot.sh $(DESTDIR)$(PREFIX)/sbin/zfs-auto-snapshot
37+
systemctl enable zfs-auto-snapshot-daily.timer
38+
systemctl enable zfs-auto-snapshot-frequent.timer
39+
systemctl enable zfs-auto-snapshot-hourly.timer
40+
systemctl enable zfs-auto-snapshot-daily.timer
41+
systemctl enable zfs-auto-snapshot-weekly.timer
42+
systemctl enable zfs-auto-snapshot-monthly.timer

README.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ instead of cron.
4141
make systemd
4242
```
4343
44-
2. optionally edit `zfs-auto-snapshot-frequent.timer` to snapshot more often and `zfs-auto-snapshot-frequent.service` to keep more snapshots by:
44+
2. optionally edit `zfs-auto-snapshot-frequent.timer` to snapshot more often and `zfs-auto-snapshot-frequent.service` to keep more snapshots by (dont forget to `systemctl daemon-reload`):
4545
4646
```
4747
cp /lib/systemd/system/zfs-auto-snapshot-frequent.timer /usr/systemd/system/
@@ -57,17 +57,16 @@ instead of cron.
5757
```
5858
5959
3. enable zfs snapshots: `zfs set com.sun:auto-snapshot=true pool/dataset`
60-
4. enable timers:
60+
61+
4. start timers:
6162
6263
```
63-
systemctl enable zfs-auto-snapshot-daily.timer
64-
systemctl enable zfs-auto-snapshot-frequent.timer
65-
systemctl enable zfs-auto-snapshot-hourly.timer
66-
systemctl enable zfs-auto-snapshot-daily.timer
67-
systemctl enable zfs-auto-snapshot-weekly.timer
68-
systemctl enable zfs-auto-snapshot-monthly.timer
64+
systemctl start zfs-auto-snapshot-monthly.timer
65+
systemctl start zfs-auto-snapshot-weekly.timer
66+
systemctl start zfs-auto-snapshot-daily.timer
67+
systemctl start zfs-auto-snapshot-hourly.timer
68+
systemctl start zfs-auto-snapshot-frequent.timer
6969
```
7070
71-
7271
[bkoop]: https://briankoopman.com/zfs-automated-snapshots/
7372
[dtim]: https://wiki.archlinux.org/index.php/Systemd/Timers

0 commit comments

Comments
 (0)