mirror of
https://github.com/zfsonlinux/zfs-auto-snapshot.git
synced 2025-08-12 14:07:17 +02:00
Check whether we have zfs-auto-snapshot before running it
This commit is contained in:
@ -1,2 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
exec zfs-auto-snapshot --quiet --syslog --label=daily --keep=31 //
|
|
||||||
|
# Only call zfs-auto-snapshot if it's available
|
||||||
|
exec which zfs-auto-snapshot > /dev/null && \
|
||||||
|
zfs-auto-snapshot --quiet --syslog --label=daily --keep=31 //
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
PATH="/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin"
|
PATH="/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin"
|
||||||
|
|
||||||
*/15 * * * * root zfs-auto-snapshot --quiet --syslog --label=frequent --keep=4 //
|
*/15 * * * * root which zfs-auto-snapshot > /dev/null && zfs-auto-snapshot --quiet --syslog --label=frequent --keep=4 //
|
||||||
|
@ -1,2 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
exec zfs-auto-snapshot --quiet --syslog --label=hourly --keep=24 //
|
|
||||||
|
# Only call zfs-auto-snapshot if it's available
|
||||||
|
exec which zfs-auto-snapshot > /dev/null && \
|
||||||
|
zfs-auto-snapshot --quiet --syslog --label=hourly --keep=24 //
|
||||||
|
@ -1,2 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
exec zfs-auto-snapshot --quiet --syslog --label=monthly --keep=12 //
|
|
||||||
|
# Only call zfs-auto-snapshot if it's available
|
||||||
|
exec which zfs-auto-snapshot > /dev/null && \
|
||||||
|
zfs-auto-snapshot --quiet --syslog --label=monthly --keep=12 //
|
||||||
|
@ -1,2 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
exec zfs-auto-snapshot --quiet --syslog --label=weekly --keep=8 //
|
|
||||||
|
# Only call zfs-auto-snapshot if it's available
|
||||||
|
exec which zfs-auto-snapshot > /dev/null && \
|
||||||
|
zfs-auto-snapshot --quiet --syslog --label=weekly --keep=8 //
|
||||||
|
Reference in New Issue
Block a user