mirror of
https://github.com/bashclub/bashclub-zfs-push-pull.git
synced 2024-11-07 21:01:58 +01:00
split snapshot/syslog "tag" to independent values
This commit is contained in:
parent
2eb6a5644e
commit
473e51d89c
@ -1,5 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# backup-zfs: use zfs send/recv to push/pull snapshots
|
# backup-zfs: use zfs send/recv to push/pull snapshots
|
||||||
|
prog="$(basename "$0")"
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
echo "$(basename "$0") [-hvq] [-t tag] [-k keep] [-d dateopts] [srchost:]srcfs [desthost:]destfs" >&2
|
echo "$(basename "$0") [-hvq] [-t tag] [-k keep] [-d dateopts] [srchost:]srcfs [desthost:]destfs" >&2
|
||||||
@ -16,7 +17,7 @@ usage() {
|
|||||||
# log to syslog; if verbose or on a tty, also to stdout
|
# log to syslog; if verbose or on a tty, also to stdout
|
||||||
# usage: log msg
|
# usage: log msg
|
||||||
log() {
|
log() {
|
||||||
logger -t $tag -- "$@"
|
logger -t "$prog" -- "$@"
|
||||||
if ! $quiet && [[ -t 1 ]] || $verbose ; then
|
if ! $quiet && [[ -t 1 ]] || $verbose ; then
|
||||||
echo "$@" >&2
|
echo "$@" >&2
|
||||||
fi
|
fi
|
||||||
@ -52,7 +53,7 @@ ZFS() {
|
|||||||
###
|
###
|
||||||
### defaults
|
### defaults
|
||||||
###
|
###
|
||||||
tag=backup-zfs
|
tag="$prog"
|
||||||
dateopts="+%F_%T"
|
dateopts="+%F_%T"
|
||||||
keep=5
|
keep=5
|
||||||
verbose=false
|
verbose=false
|
||||||
|
Loading…
Reference in New Issue
Block a user