Skip to content

Commit 9d25e4d

Browse files
committed
more documentation
1 parent f83f46f commit 9d25e4d

File tree

2 files changed

+56
-11
lines changed

2 files changed

+56
-11
lines changed

bin/znapzendzetup

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -446,29 +446,41 @@ B<list> function to see the keys.
446446
modify the configuration of a dataset. see the descriptions in the B<create>
447447
function for details.
448448
449-
head2 B<export>
449+
=head2 B<export>
450450
451451
dumps the backup configuration of a dataset
452452
453453
znapzendzetup export I<dataset>
454454
455-
head2 B<import>
455+
=head2 B<import>
456456
457-
imports a configuration from a file or STDIN and applies it to a dataset
457+
reads configuration data from a file or STDIN and prints it content
458458
459-
use the option B<--write> to store the configuration on the dataset
459+
=over
460+
461+
=item B<--write>
462+
463+
actually store the new configuration into the dataset given on the
464+
commandline.
465+
466+
=item B<--prop> I<key>="I<value>" [ B<--prop> ... ]
467+
468+
may be called multiple times to override properties in the imported config.
469+
470+
471+
=head1 EXAMPLES
460472
461-
=head1 EXAMPLE
473+
create a complex backup task
462474
463475
znapzendzetup create --recursive --mbuffer=/opt/omni/bin/mbuffer \
464-
--mbuffersize=1337M --tsformat='%Y-%m-%d-%H%M%S' \
476+
--mbuffersize=1G --tsformat='%Y-%m-%d-%H%M%S' \
465477
--pre-snap-command="/bin/sh /usr/local/bin/lock_flush_db.sh" \
466478
--post-snap-command="/bin/sh /usr/local/bin/unlock_db.sh" \
467479
SRC '7d=>1h,30d=>4h,90d=>1d' tank/home \
468480
DST:a '7d=>1h,30d=>4h,90d=>1d,1y=>1w,10y=>1month' backup/home \
469481
DST:b '7d=>1h,30d=>4h,90d=>1d,1y=>1w,10y=>1month' root@bserv:backup/home
470482
471-
head1 EXAMPLE
483+
copy the setup from one fileset to another
472484
473485
znapzendzetup export tank/home | znapzendzetup import --write tank/new_home
474486

doc/znapzendzetup.pod

Lines changed: 37 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,11 @@ where 'command' is one of the following:
3030

3131
list [src_dataset]
3232

33+
export <src_dataset>
34+
35+
import [--write] [--prop <property>=<value>, [--prop ...] ...]
36+
<src_dataset> [<prop_dump_file>]
37+
3338
help
3439

3540
man
@@ -55,7 +60,7 @@ or multiples of them. You can use both the full name or a shortcut according
5560
to the following table:
5661

5762
second|sec|s
58-
minute|min|M
63+
minute|min
5964
hour|h
6065
day|d
6166
week|w
@@ -130,7 +135,7 @@ e.g. for database locking/flushing (pre) and unlocking (post).
130135

131136
to remove configuration from a dataset just give its name
132137

133-
znapzendzetup I<dataset>
138+
znapzendzetup delete I<dataset>
134139

135140
the B<delete> function understands the following options
136141

@@ -148,16 +153,44 @@ B<list> function to see the keys.
148153
modify the configuration of a dataset. see the descriptions in the B<create>
149154
function for details.
150155

151-
=head1 EXAMPLE
156+
=head2 B<export>
157+
158+
dumps the backup configuration of a dataset
159+
160+
znapzendzetup export I<dataset>
161+
162+
=head2 B<import>
163+
164+
reads configuration data from a file or STDIN and prints it content
165+
166+
=over
167+
168+
=item B<--write>
169+
170+
actually store the new configuration into the dataset given on the
171+
commandline.
172+
173+
=item B<--prop> I<key>="I<value>" [ B<--prop> ... ]
174+
175+
may be called multiple times to override properties in the imported config.
176+
177+
178+
=head1 EXAMPLES
179+
180+
create a complex backup task
152181

153182
znapzendzetup create --recursive --mbuffer=/opt/omni/bin/mbuffer \
154-
--mbuffersize=1337M --tsformat='%Y-%m-%d-%H%M%S' \
183+
--mbuffersize=1G --tsformat='%Y-%m-%d-%H%M%S' \
155184
--pre-snap-command="/bin/sh /usr/local/bin/lock_flush_db.sh" \
156185
--post-snap-command="/bin/sh /usr/local/bin/unlock_db.sh" \
157186
SRC '7d=>1h,30d=>4h,90d=>1d' tank/home \
158187
DST:a '7d=>1h,30d=>4h,90d=>1d,1y=>1w,10y=>1month' backup/home \
159188
DST:b '7d=>1h,30d=>4h,90d=>1d,1y=>1w,10y=>1month' root@bserv:backup/home
160189

190+
copy the setup from one fileset to another
191+
192+
znapzendzetup export tank/home | znapzendzetup import --write tank/new_home
193+
161194
=head1 COPYRIGHT
162195

163196
Copyright (c) 2014 by OETIKER+PARTNER AG. All rights reserved.

0 commit comments

Comments
 (0)