@@ -5,30 +5,30 @@ that is compatible with [ZFS on Linux](http://zfsonlinux.org/).
55
66My fork removes the automatic installation of cron entries that do things
77the user may not desire. This fork only installs the script and leaves manual
8- crontab configuration up to the user.
8+ crontab/systemd-timer configuration up to the user.
99
1010This program is a posixly correct bourne shell script. It depends only on
11- the zfs utilities and cron , and can run in the dash shell.
11+ the zfs utilities, and can run in the dash shell.
1212
1313
1414Installation:
1515-------------
1616```
17- wget https://github.com/ajhaydock/zfs-auto-snapshot/archive/master.zip
18- unzip master.zip
19- cd zfs-auto-snapshot-master
17+ git clone https://github.com/ajhaydock/zfs-auto-snapshot.git
18+ cd zfs-auto-snapshot
2019sudo make install
2120```
2221
2322
24- Example Crontab Entries :
23+ Scheduling :
2524-------------
26- ```
27- ## ZFS Auto Snapshot
25+ I recommend scheduling this using [ systemd timers] ( https://wiki.archlinux.org/index.php/Systemd/Timers ) .
2826
29- # At half past midnight every day, create a daily ZFS snapshot of 'archive'. Keep 7 of these.
30- 30 0 * * * /usr/local/sbin/zfs-auto-snapshot archive --recursive --quiet --syslog --prefix="auto" --label="daily" --keep=7
27+ You can find some example ` .timer ` files in the examples directory of this repo.
3128
32- # At 1AM every Monday, create a weekly ZFS snapshot of 'archive'. Keep 4 of these.
33- 0 1 * * 1 /usr/local/sbin/zfs-auto-snapshot archive --recursive --quiet --syslog --prefix="auto" --label="weekly" --keep=4
29+ Copy the ` .timer ` and corresponding ` .service ` file to ` /etc/systemd/system/ ` , and then enable the timers as follows:
30+ ```
31+ sudo systemctl daemon-reload
32+ sudo systemctl enable zfs-auto-daily.timer
33+ sudo systemctl enable zfs-auto-weekly.timer
3434```
0 commit comments