diff --git a/Makefile.am b/Makefile.am index 9d435dc7..4d48e990 100644 --- a/Makefile.am +++ b/Makefile.am @@ -48,8 +48,8 @@ iman_DATA = $(MAN) doc/%.pod: bin/% VERSION $(AM_V_GEN)mkdir -p doc;grep -A100000 '=head1 NAME' $< > $@ -man/%.1: VERSION - $(AM_V_GEN)mkdir -p man; test "@POD2MAN@" = "no" || @POD2MAN@ --release=$(VERSION) --center=@PACKAGE@ $< > $@ +man/%.1: bin/% VERSION + $(AM_V_GEN)mkdir -p man; test $(POD2MAN) = "no" || $(POD2MAN) --release=$(VERSION) --center=$(PACKAGE_NAME) $< > $@ README.md COPYRIGHT: VERSION $(AM_V_GEN)$(PERL) -i -p -e 's/\d{4}-\d{2}-\d{2}/$(DATE)/g;s/\d+\.\d+\.\d+/$(PACKAGE_VERSION)/g' $@ @@ -60,10 +60,10 @@ install-exec-hook: dist-hook: $(POD) $(MAN) $(AM_V_GEN)cd $(distdir) && $(PERL) -i -p -e '"$(PACKAGE_VERSION)" =~ /(\d+)\.(\d+)\.(\d+)/ and $$v = sprintf("%d.%03d%03d",$$1,$$2,$$3) and s/^\$$VERSION\s+=\s+".+?"/\$$VERSION = "$$d"/;' $(BIN) - $(AM_V_GEN)cd $(distdir) && touch man/* + $(GMAKE) $(MAN) prebuild: - make dist + $(GMAKE) dist tar xvf znapzend-$(PACKAGE_VERSION).tar.gz cd znapzend-$(PACKAGE_VERSION) && mkdir -p znapzend-prebuilt-$(PACKAGE_VERSION) cd znapzend-$(PACKAGE_VERSION)/znapzend-prebuilt-$(PACKAGE_VERSION) && tar zxvf ../../znapzend-thirdparty-FAT-2014-07-31.tar.gz diff --git a/Makefile.in b/Makefile.in index 959fb65f..bc4157a1 100644 --- a/Makefile.in +++ b/Makefile.in @@ -827,8 +827,8 @@ uninstall-am: uninstall-dist_binSCRIPTS uninstall-imanDATA \ doc/%.pod: bin/% VERSION $(AM_V_GEN)mkdir -p doc;grep -A100000 '=head1 NAME' $< > $@ -man/%.1: VERSION - $(AM_V_GEN)mkdir -p man; test "@POD2MAN@" = "no" || @POD2MAN@ --release=$(VERSION) --center=@PACKAGE@ $< > $@ +man/%.1: bin/% VERSION + $(AM_V_GEN)mkdir -p man; test $(POD2MAN) = "no" || $(POD2MAN) --release=$(VERSION) --center=$(PACKAGE_NAME) $< > $@ README.md COPYRIGHT: VERSION $(AM_V_GEN)$(PERL) -i -p -e 's/\d{4}-\d{2}-\d{2}/$(DATE)/g;s/\d+\.\d+\.\d+/$(PACKAGE_VERSION)/g' $@ @@ -839,10 +839,10 @@ install-exec-hook: dist-hook: $(POD) $(MAN) $(AM_V_GEN)cd $(distdir) && $(PERL) -i -p -e '"$(PACKAGE_VERSION)" =~ /(\d+)\.(\d+)\.(\d+)/ and $$v = sprintf("%d.%03d%03d",$$1,$$2,$$3) and s/^\$$VERSION\s+=\s+".+?"/\$$VERSION = "$$d"/;' $(BIN) - $(AM_V_GEN)cd $(distdir) && touch man/* + $(GMAKE) $(MAN) prebuild: - make dist + $(GMAKE) dist tar xvf znapzend-$(PACKAGE_VERSION).tar.gz cd znapzend-$(PACKAGE_VERSION) && mkdir -p znapzend-prebuilt-$(PACKAGE_VERSION) cd znapzend-$(PACKAGE_VERSION)/znapzend-prebuilt-$(PACKAGE_VERSION) && tar zxvf ../../znapzend-thirdparty-FAT-2014-07-31.tar.gz diff --git a/VERSION b/VERSION index ac39a106..f374f666 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.9.0 +0.9.1 diff --git a/configure b/configure index 2cdb49f6..9332ebfa 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.68 for znapzend 0.9.0. +# Generated by GNU Autoconf 2.68 for znapzend 0.9.1. # # Report bugs to . # @@ -559,8 +559,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='znapzend' PACKAGE_TARNAME='znapzend' -PACKAGE_VERSION='0.9.0' -PACKAGE_STRING='znapzend 0.9.0' +PACKAGE_VERSION='0.9.1' +PACKAGE_STRING='znapzend 0.9.1' PACKAGE_BUGREPORT='support@oetiker.ch' PACKAGE_URL='' @@ -1199,7 +1199,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures znapzend 0.9.0 to adapt to many kinds of systems. +\`configure' configures znapzend 0.9.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1265,7 +1265,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of znapzend 0.9.0:";; + short | recursive ) echo "Configuration of znapzend 0.9.1:";; esac cat <<\_ACEOF @@ -1351,7 +1351,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -znapzend configure 0.9.0 +znapzend configure 0.9.1 generated by GNU Autoconf 2.68 Copyright (C) 2010 Free Software Foundation, Inc. @@ -1368,7 +1368,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by znapzend $as_me 0.9.0, which was +It was created by znapzend $as_me 0.9.1, which was generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2191,7 +2191,7 @@ fi # Define the identity of the package. PACKAGE='znapzend' - VERSION='0.9.0' + VERSION='0.9.1' cat >>confdefs.h <<_ACEOF @@ -3186,7 +3186,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by znapzend $as_me 0.9.0, which was +This file was extended by znapzend $as_me 0.9.1, which was generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -3239,7 +3239,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -znapzend config.status 0.9.0 +znapzend config.status 0.9.1 configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" diff --git a/man/znapzend.1 b/man/znapzend.1 index e69de29b..1e5e2618 100644 --- a/man/znapzend.1 +++ b/man/znapzend.1 @@ -0,0 +1,232 @@ +.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16) +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. \*(C+ will +.\" give a nicer C++. Capital omega is used to do unbreakable dashes and +.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, +.\" nothing in troff, for use with C<>. +.tr \(*W- +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +'br\} +.\" +.\" Escape single quotes in literal strings from groff's Unicode transform. +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.ie \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.el \{\ +. de IX +.. +.\} +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "ZNAPZEND 1" +.TH ZNAPZEND 1 "2014-08-01" "0.9.1" "znapzend" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.if n .ad l +.nh +.SH "NAME" +znapzend \- znapzend daemon +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +\&\fBznapzend\fR [\fIoptions\fR...] +.PP +.Vb 10 +\& \-\-man show man\-page and exit +\& \-h,\-\-help display this help and exit +\& \-d,\-\-debug print debug messages to STDERR +\& \-n,\-\-noaction run in simulation mode. does no changes to the filesystem +\& \-\-nodestroy does all changes to the filesystem except destroy +\& \-\-logto=x select where to log to (syslog:: or ) +\& \-\-loglevel=x define the log level when logging to file +\& \-\-pidfile=x write a pid file when running in daemon mode +\& \-\-daemonize fork into the background +\& \-\-runonce=x run one round on source dataset x +.Ve +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +ZnapZend is a snapshot based zfs backup daemon creating snapshots on a +scheduled basis on the source filesystem and on destination filesystems. +.PP +ZnapZend reads its configuration from custom properties in the fileset. Use +znapzendzetup to set these properties. +.IP "\fB\-d\fR, \fB\-\-debug\fR" 4 +.IX Item "-d, --debug" +talk a lot while running. Sends debug messages to stderr. +.IP "\fB\-n\fR, \fB\-\-noaction\fR" 4 +.IX Item "-n, --noaction" +don't do any actions which have lasting effect. Ideal to try our new new +configurations together with \fB\-\-debug\fR +.IP "\fB\-\-nodestroy\fR" 4 +.IX Item "--nodestroy" +do all changes to the filesystem except destroy old snapshots +.IP "\fB\-\-logto\fR={\fBsyslog::\fR\fIfacility\fR|\fIfilepath\fR}" 4 +.IX Item "--logto={syslog::facility|filepath}" +send logs out to either syslog or a logfile. Default is to send logs to +\&\fBsyslog::daemon\fR when runing daemonized. When running in debug mode, the +logs will go to \s-1STDERR\s0 by default. +.Sp +Examples: +.Sp +.Vb 2 +\& \-\-logto=/var/log/znapzend.log +\& \-\-logto=syslog::daemon +.Ve +.IP "\fB\-\-loglevel\fR={\fBdebug\fR|\fBinfo\fR|\fBwarning\fR|\fBerr\fR|\fBalert\fR}" 4 +.IX Item "--loglevel={debug|info|warning|err|alert}" +Define the log level when logging to file. Default is debug. +.IP "\fB\-\-pidfile\fR=\fIpath\fR" 4 +.IX Item "--pidfile=path" +write a pid file when running in daemon mode +.IP "\fB\-\-daemonize\fR" 4 +.IX Item "--daemonize" +Fork into the background. +.IP "\fB\-\-runonce\fR=\fIfileset\fR" 4 +.IX Item "--runonce=fileset" +run one round on source \fIfileset\fR. This is very useful for testing. +Use it in connection with \fB\-\-noaction\fR and \fB\-\-debug\fR while +testing your new configuration +.SH "EXAMPLE" +.IX Header "EXAMPLE" +To test a new config +.PP +.Vb 1 +\& znapzend \-\-debug \-\-noaction \-\-runonce=tank/test +.Ve +.PP +To run as a daemon +.PP +.Vb 1 +\& znapzend \-\-daemonize \-\-pidfile=/var/run/znapzend.pid \-\-logto=syslog::daemon +.Ve +.SH "COPYRIGHT" +.IX Header "COPYRIGHT" +Copyright (c) 2014 by \s-1OETIKER+PARTNER\s0 \s-1AG\s0. All rights reserved. +.SH "LICENSE" +.IX Header "LICENSE" +This program is free software: you can redistribute it and/or modify it +under the terms of the \s-1GNU\s0 General Public License as published by the Free +Software Foundation, either version 3 of the License, or (at your option) +any later version. +.PP +This program is distributed in the hope that it will be useful, but \s-1WITHOUT\s0 +\&\s-1ANY\s0 \s-1WARRANTY\s0; without even the implied warranty of \s-1MERCHANTABILITY\s0 or +\&\s-1FITNESS\s0 \s-1FOR\s0 A \s-1PARTICULAR\s0 \s-1PURPOSE\s0. See the \s-1GNU\s0 General Public License for +more details. +.PP +You should have received a copy of the \s-1GNU\s0 General Public License along with +this program. If not, see . +.SH "AUTHOR" +.IX Header "AUTHOR" +Tobias\ Oetiker\ , +Dominik\ Hassler\ +.SH "HISTORY" +.IX Header "HISTORY" +.Vb 2 +\& 2014\-06\-01 had Multi destination backup +\& 2014\-05\-30 had Initial Version +.Ve diff --git a/man/znapzendzetup.1 b/man/znapzendzetup.1 index e69de29b..1862cbbc 100644 --- a/man/znapzendzetup.1 +++ b/man/znapzendzetup.1 @@ -0,0 +1,361 @@ +.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16) +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. \*(C+ will +.\" give a nicer C++. Capital omega is used to do unbreakable dashes and +.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, +.\" nothing in troff, for use with C<>. +.tr \(*W- +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +'br\} +.\" +.\" Escape single quotes in literal strings from groff's Unicode transform. +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.ie \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.el \{\ +. de IX +.. +.\} +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "ZNAPZENDZETUP 1" +.TH ZNAPZENDZETUP 1 "2014-08-01" "0.9.1" "znapzend" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.if n .ad l +.nh +.SH "NAME" +znapzendzetup \- znapzend setup utility +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +\&\fBznapzendzetup\fR \fIcommand\fR [\fIoptions...\fR] +.PP +where 'command' is one of the following: +.PP +.Vb 6 +\& create [\-\-recursive] [\-\-mbuffer=] [\-\-mbuffersize=] \e +\& [\-\-pre\-snap\-command=] \e +\& [\-\-post\-snap\-command=] \e +\& [\-\-tsformat=] \-\-donotask \e +\& SRC plan dataset \e +\& [ DST[:key] plan [[user@]host:]dataset ] +\& +\& delete [\-\-dst=key] +\& +\& edit [\-\-recursive=on|off] [\-\-mbuffer=|off] [\-\-mbuffersize=] \e +\& [\-\-pre\-snap\-command=|off] \e +\& [\-\-post\-snap\-command=|off] \e +\& [\-\-tsformat=] \-\-donotask \e +\& SRC [plan] dataset \e +\& [ DST:key [plan] [dataset] ] +\& +\& enable +\& +\& disable +\& +\& list [src_dataset] +\& +\& export +\& +\& import [\-\-write] [\-\-prop =, [\-\-prop ...] ...] +\& [] +\& +\& help +\& +\& man +.Ve +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +Use znapzendsetup to configure your backup tasks. The cli is modled after +the zfs commandline. Below a few notes on main commands. +.SS "\fBcreate\fP" +.IX Subsection "create" +The heart of the znapzend backup is the plan. The plan specifies how often +to backup and for how long to keep the backups. A plan is required both for +the source and the destination datasets. +.PP +The plan consists of a series of retention periodes to interval +associations: +.PP +.Vb 1 +\& retA=>intA,retB=>intB,... +.Ve +.PP +Both intervals and retention periods are expressed in standard units of time +or multiples of them. You can use both the full name or a shortcut according +to the following table: +.PP +.Vb 7 +\& second|sec|s +\& minute|min +\& hour|h +\& day|d +\& week|w +\& month|mon|m +\& year|y +.Ve +.PP +To keep one copy every 30 minutes for one week, specify: +.PP +.Vb 1 +\& 1week=>30min +.Ve +.PP +To keep one copy every two days for 10 years: +.PP +.Vb 1 +\& 10year=>2day +.Ve +.PP +In a minimal setup, you just specify a plan for the \fB\s-1SRC\s0\fR fileset. This +will cause snapshots to be taken and destroyed according to the plan. You +can then add one or several destinations (\fB\s-1DST\s0\fR) both local (preferably on +a different pool) or remote. +.PP +When adding multiple \fB\s-1DST\s0\fR entries, each will get labled for later +identification, optionally you can specify your own label. +.IP "\fB\-\-tsformat\fR=\fIlimited-strftime-format\fR" 4 +.IX Item "--tsformat=limited-strftime-format" +The \fB\-\-tsformat\fR option specifies how the names of the snapshots are +constructed. +.Sp +The syntax is strftime\-like. The string must consist of the mandatory +.Sp +.Vb 1 +\& %Y %m %d %H %M %S +.Ve +.Sp +Optionally, +.Sp +.Vb 1 +\& \- _ . : +.Ve +.Sp +characters as well as any alphanumeric character are allowed. +.Sp +If not specified, \fB\-\-tsformat\fR defaults to \f(CW\*(C`%Y\-%m\-%d\-%H%M%S\*(C'\fR. +.Sp +If \fB\-\-tsformat\fR string is suffixed by a 'Z', times will be in \s-1UTC\s0. E.g.: +.Sp +.Vb 1 +\& \-\-tsformat=\*(Aq%Y\-%m\-%dT%H:%M:%SZ\*(Aq +.Ve +.IP "\fB\-\-mbuffer\fR=\fI/usr/bin/mbuffer\fR" 4 +.IX Item "--mbuffer=/usr/bin/mbuffer" +Specify the path to your copy of the mbuffer utility. +.IP "\fB\-\-mbuffersize\fR=\fInumber\fR{\fBb\fR|\fBk\fR|\fBM\fR|\fBG\fR}" 4 +.IX Item "--mbuffersize=number{b|k|M|G}" +The size of the mbuffer can be set with the \fB\-\-mbuffersize\fR option. It +supports the following units: +.Sp +.Vb 1 +\& b, k, M, G +.Ve +.Sp +To specify a mbuffer size of 100MB: +.Sp +.Vb 1 +\& \-\-mbuffersize=100M +.Ve +.Sp +If not set, the buffer size defaults to 1GB. +.IP "\fB\-\-donotask\fR" 4 +.IX Item "--donotask" +Apply changes immediately. Without being asked if the config is as you +intended it to be. +.IP "\fB\-\-pre\-snap\-command\fR=\fI/path/bin args\fR, \fB\-\-post\-snap\-command\fR=\fI/path/bin args\fR" 4 +.IX Item "--pre-snap-command=/path/bin args, --post-snap-command=/path/bin args" +Run commands/scripts before and after snapshots are taken on source. +e.g. for database locking/flushing (pre) and unlocking (post). +.SS "\fBdelete\fP" +.IX Subsection "delete" +to remove configuration from a dataset just give its name +.PP +.Vb 1 +\& znapzendzetup delete I +.Ve +.PP +the \fBdelete\fR function understands the following options +.IP "\fB\-\-dst\fR=\fIkey\fR" 4 +.IX Item "--dst=key" +to only remove a destination, specify the key of the destionation. Use the +\&\fBlist\fR function to see the keys. +.SS "\fBedit\fP" +.IX Subsection "edit" +modify the configuration of a dataset. see the descriptions in the \fBcreate\fR +function for details. +.SS "\fBexport\fP" +.IX Subsection "export" +dumps the backup configuration of a dataset +.PP +.Vb 1 +\& znapzendzetup export I +.Ve +.SS "\fBimport\fP" +.IX Subsection "import" +reads configuration data from a file or \s-1STDIN\s0 and prints it content +.IP "\fB\-\-write\fR" 4 +.IX Item "--write" +actually store the new configuration into the dataset given on the +commandline. +.ie n .IP "\fB\-\-prop\fR \fIkey\fR=""\fIvalue\fR"" [ \fB\-\-prop\fR ... ]" 4 +.el .IP "\fB\-\-prop\fR \fIkey\fR=``\fIvalue\fR'' [ \fB\-\-prop\fR ... ]" 4 +.IX Item "--prop key=""value"" [ --prop ... ]" +may be called multiple times to override properties in the imported config. +.SH "EXAMPLES" +.IX Header "EXAMPLES" +create a complex backup task +.PP +.Vb 7 +\& znapzendzetup create \-\-recursive \-\-mbuffer=/opt/omni/bin/mbuffer \e +\& \-\-mbuffersize=1G \-\-tsformat=\*(Aq%Y\-%m\-%d\-%H%M%S\*(Aq \e +\& \-\-pre\-snap\-command="/bin/sh /usr/local/bin/lock_flush_db.sh" \e +\& \-\-post\-snap\-command="/bin/sh /usr/local/bin/unlock_db.sh" \e +\& SRC \*(Aq7d=>1h,30d=>4h,90d=>1d\*(Aq tank/home \e +\& DST:a \*(Aq7d=>1h,30d=>4h,90d=>1d,1y=>1w,10y=>1month\*(Aq backup/home \e +\& DST:b \*(Aq7d=>1h,30d=>4h,90d=>1d,1y=>1w,10y=>1month\*(Aq root@bserv:backup/home +.Ve +.PP +copy the setup from one fileset to another +.PP +.Vb 1 +\& znapzendzetup export tank/home | znapzendzetup import \-\-write tank/new_home +.Ve +.SH "COPYRIGHT" +.IX Header "COPYRIGHT" +Copyright (c) 2014 by \s-1OETIKER+PARTNER\s0 \s-1AG\s0. All rights reserved. +.SH "LICENSE" +.IX Header "LICENSE" +This program is free software: you can redistribute it and/or modify it +under the terms of the \s-1GNU\s0 General Public License as published by the Free +Software Foundation, either version 3 of the License, or (at your option) +any later version. +.PP +This program is distributed in the hope that it will be useful, but \s-1WITHOUT\s0 +\&\s-1ANY\s0 \s-1WARRANTY\s0; without even the implied warranty of \s-1MERCHANTABILITY\s0 or +\&\s-1FITNESS\s0 \s-1FOR\s0 A \s-1PARTICULAR\s0 \s-1PURPOSE\s0. See the \s-1GNU\s0 General Public License for +more details. +.PP +You should have received a copy of the \s-1GNU\s0 General Public License along with +this program. If not, see . +.SH "AUTHOR" +.IX Header "AUTHOR" +Tobias\ Oetiker\ +Dominik\ Hassler\ +.SH "HISTORY" +.IX Header "HISTORY" +2014\-07\-22 had Pre and post snapshot commands +2014\-06\-29 had Flexible snapshot time format +2014\-06\-01 had Multi destination backup +2014\-05\-30 had Initial Version +.SH "POD ERRORS" +.IX Header "POD ERRORS" +Hey! \fBThe above document had some coding errors, which are explained below:\fR +.IP "Around line 481:" 4 +.IX Item "Around line 481:" +You forgot a '=back' before '=head1' diff --git a/man/znapzendztatz.1 b/man/znapzendztatz.1 index e69de29b..c6da21b8 100644 --- a/man/znapzendztatz.1 +++ b/man/znapzendztatz.1 @@ -0,0 +1,170 @@ +.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16) +.\" +.\" Standard preamble: +.\" ======================================================================== +.de Sp \" Vertical space (when we can't use .PP) +.if t .sp .5v +.if n .sp +.. +.de Vb \" Begin verbatim text +.ft CW +.nf +.ne \\$1 +.. +.de Ve \" End verbatim text +.ft R +.fi +.. +.\" Set up some character translations and predefined strings. \*(-- will +.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left +.\" double quote, and \*(R" will give a right double quote. \*(C+ will +.\" give a nicer C++. Capital omega is used to do unbreakable dashes and +.\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, +.\" nothing in troff, for use with C<>. +.tr \(*W- +.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' +.ie n \{\ +. ds -- \(*W- +. ds PI pi +. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch +. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch +. ds L" "" +. ds R" "" +. ds C` "" +. ds C' "" +'br\} +.el\{\ +. ds -- \|\(em\| +. ds PI \(*p +. ds L" `` +. ds R" '' +'br\} +.\" +.\" Escape single quotes in literal strings from groff's Unicode transform. +.ie \n(.g .ds Aq \(aq +.el .ds Aq ' +.\" +.\" If the F register is turned on, we'll generate index entries on stderr for +.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index +.\" entries marked with X<> in POD. Of course, you'll have to process the +.\" output yourself in some meaningful fashion. +.ie \nF \{\ +. de IX +. tm Index:\\$1\t\\n%\t"\\$2" +.. +. nr % 0 +. rr F +.\} +.el \{\ +. de IX +.. +.\} +.\" +.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). +.\" Fear. Run. Save yourself. No user-serviceable parts. +. \" fudge factors for nroff and troff +.if n \{\ +. ds #H 0 +. ds #V .8m +. ds #F .3m +. ds #[ \f1 +. ds #] \fP +.\} +.if t \{\ +. ds #H ((1u-(\\\\n(.fu%2u))*.13m) +. ds #V .6m +. ds #F 0 +. ds #[ \& +. ds #] \& +.\} +. \" simple accents for nroff and troff +.if n \{\ +. ds ' \& +. ds ` \& +. ds ^ \& +. ds , \& +. ds ~ ~ +. ds / +.\} +.if t \{\ +. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" +. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' +. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' +. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' +. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' +. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' +.\} +. \" troff and (daisy-wheel) nroff accents +.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' +.ds 8 \h'\*(#H'\(*b\h'-\*(#H' +.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] +.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' +.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' +.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] +.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] +.ds ae a\h'-(\w'a'u*4/10)'e +.ds Ae A\h'-(\w'A'u*4/10)'E +. \" corrections for vroff +.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' +.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' +. \" for low resolution devices (crt and lpr) +.if \n(.H>23 .if \n(.V>19 \ +\{\ +. ds : e +. ds 8 ss +. ds o a +. ds d- d\h'-1'\(ga +. ds D- D\h'-1'\(hy +. ds th \o'bp' +. ds Th \o'LP' +. ds ae ae +. ds Ae AE +.\} +.rm #[ #] #H #V #F C +.\" ======================================================================== +.\" +.IX Title "ZNAPZENDZTATZ 1" +.TH ZNAPZENDZTATZ 1 "2014-08-01" "0.9.1" "znapzend" +.\" For nroff, turn off justification. Always turn off hyphenation; it makes +.\" way too many mistakes in technical documents. +.if n .ad l +.nh +.SH "NAME" +znapzendztatz \- znapzend statistics utility +.SH "SYNOPSIS" +.IX Header "SYNOPSIS" +\&\fBznapzendztatz\fR [\fIoptions\fR...] [src_dataset] +.PP +.Vb 3 +\& \-H do not print headers +\& \-\-man show man\-page and exit +\& \-h,\-\-help display this help and exit +.Ve +.SH "DESCRIPTION" +.IX Header "DESCRIPTION" +znapzendztatz shows statistics of snapshots created and storage space usage +.SH "COPYRIGHT" +.IX Header "COPYRIGHT" +Copyright (c) 2014 by \s-1OETIKER+PARTNER\s0 \s-1AG\s0. All rights reserved. +.SH "LICENSE" +.IX Header "LICENSE" +This program is free software: you can redistribute it and/or modify it +under the terms of the \s-1GNU\s0 General Public License as published by the Free +Software Foundation, either version 3 of the License, or (at your option) +any later version. +.PP +This program is distributed in the hope that it will be useful, but \s-1WITHOUT\s0 +\&\s-1ANY\s0 \s-1WARRANTY\s0; without even the implied warranty of \s-1MERCHANTABILITY\s0 or +\&\s-1FITNESS\s0 \s-1FOR\s0 A \s-1PARTICULAR\s0 \s-1PURPOSE\s0. See the \s-1GNU\s0 General Public License for +more details. +.PP +You should have received a copy of the \s-1GNU\s0 General Public License along with +this program. If not, see . +.SH "AUTHOR" +.IX Header "AUTHOR" +Tobias\ Oetiker\ +Dominik\ Hassler\ +.SH "HISTORY" +.IX Header "HISTORY" +2014\-06\-29 had Flexible snapshot time format +2014\-06\-05 had Initial Version