mirror of
https://github.com/bashclub/bashclub-zfs-push-pull.git
synced 2024-12-24 13:40:13 +01:00
Improve usage statement
This commit is contained in:
parent
f2b40a2ce8
commit
481212e5e6
23
backup-zfs
23
backup-zfs
@ -3,14 +3,21 @@
|
|||||||
prog="$(basename "$0")"
|
prog="$(basename "$0")"
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
echo "$(basename "$0") [-hvq] [-t tag] [-k keep] [-d dateopts] [srchost:]srcfs [desthost:]destfs" >&2
|
cat >&2 <<-EOF
|
||||||
echo "$(basename "$0"): use zfs send/recv to push/pull snapshots" >&2
|
usage: $prog [-hvq] [-t tag] [-k keep] [-d dateopts] src dest
|
||||||
printf "%15s: %s\n" >&2 "-h" "this help statement" \
|
use zfs send/recv to push/pull snapshots
|
||||||
"-v" "verbose" \
|
|
||||||
"-q" "quiet" \
|
src the source fs, specified as [host:]pool/path/to/fs
|
||||||
"-t tag" "tag to use for naming snapshots and in syslog" \
|
dest the destination fs parent, specified as [host:]pool/path/to/fs
|
||||||
"-k keep" "number of snapshots to keep on src" \
|
(the final path component of src will be appended to dest)
|
||||||
"-d dateopts" "options string for date(1), used in naming snapshots"
|
|
||||||
|
-h help
|
||||||
|
-v verbose mode
|
||||||
|
-q quiet mode
|
||||||
|
-t tag tag to use for naming snapshots (default: backup-zfs)
|
||||||
|
-k keep number of snapshots to keep on src (default: 5)
|
||||||
|
-d dateopts options for date(1) - used to name the snapshots (default: +%F_%T)
|
||||||
|
EOF
|
||||||
exit $1
|
exit $1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user