Skip to content

Commit 3dfa16d

Browse files
committed
Tweaks
1 parent a9b7a9e commit 3dfa16d

File tree

6 files changed

+23
-7
lines changed

6 files changed

+23
-7
lines changed

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,14 @@ I recommend scheduling this using [systemd timers](https://wiki.archlinux.org/in
2626

2727
You can find some example `.timer` files in the examples directory of this repo.
2828

29-
Copy the `.timer` and corresponding `.service` file to `/etc/systemd/system/`, and then enable the timers as follows:
29+
Copy the `.timer` and corresponding `.service` file to `/etc/systemd/system/`:
30+
```
31+
cp -f -v *.timer *.service /etc/systemd/system/
32+
```
33+
Then enable the timers as follows:
3034
```
3135
sudo systemctl daemon-reload
36+
sudo systemctl start zfs-auto-hourly.timer && sudo systemctl enable zfs-auto-hourly.timer
3237
sudo systemctl start zfs-auto-daily.timer && sudo systemctl enable zfs-auto-daily.timer
3338
sudo systemctl start zfs-auto-weekly.timer && sudo systemctl enable zfs-auto-weekly.timer
3439
```

example-timers/zfs-auto-daily.service

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@
22
Description=Create a daily ZFS snapshot of archive. Keep 7 of these.
33

44
[Service]
5-
User=root
6-
ExecStart=/usr/local/sbin/zfs-auto-snapshot archive --recursive --quiet --syslog --prefix="auto" --label="daily" --keep=7
5+
ExecStart=/usr/local/sbin/zfs-auto-snapshot --quiet --syslog --prefix=auto --label=daily --keep=7 //
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[Unit]
2-
Description=Daily ZFS snapshots at 1:15AM.
2+
Description=Daily ZFS snapshots at 1:20AM.
33

44
[Timer]
5-
OnCalendar=*-*-* 01:15:00
5+
OnCalendar=*-*-* 01:20:00
66

77
[Install]
88
WantedBy=timers.target
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[Unit]
2+
Description=Create an hourly ZFS snapshot of archive. Keep 24 of these.
3+
4+
[Service]
5+
ExecStart=/usr/local/sbin/zfs-auto-snapshot --quiet --syslog --prefix=auto --label=hourly --keep=24 //
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[Unit]
2+
Description=Hourly ZFS snapshots at 10min past each hour.
3+
4+
[Timer]
5+
OnCalendar=*-*-* *:10:00
6+
7+
[Install]
8+
WantedBy=timers.target

example-timers/zfs-auto-weekly.service

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@
22
Description=Create a weekly ZFS snapshot of archive. Keep 4 of these.
33

44
[Service]
5-
User=root
6-
ExecStart=/usr/local/sbin/zfs-auto-snapshot archive --recursive --quiet --syslog --prefix="auto" --label="weekly" --keep=4
5+
ExecStart=/usr/local/sbin/zfs-auto-snapshot --quiet --syslog --prefix=auto --label=weekly --keep=4 //

0 commit comments

Comments
 (0)