fix off by 1 error
[rrdtool.git] / doc / rrddump.pod
1 =head1 NAME
2
3 rrddump - dump the contents of an RRD to XML format
4
5 =head1 SYNOPSIS
6
7 B<rrdtool> B<dump> I<filename.rrd> [I<filename.xml>]
8 S<[B<--header>|B<-h> {none,xsd,dtd}]>
9 S<[B<--no-header>]>
10 S<[B<--daemon> I<address>]>
11 S<E<gt> I<filename.xml>>
12
13 =head1 DESCRIPTION
14
15 The B<dump> function writes the contents of an B<RRD> in human
16 readable (?) XML format to a file or to stdout. This format can
17 be read by rrdrestore. Together they allow you to transfer your
18 files from one computer architecture to another as well to
19 manipulate the contents of an B<RRD> file in a somewhat more
20 convenient manner.
21
22 =over 8
23
24 =item I<filename.rrd>
25
26 The name of the B<RRD> you want to dump.
27
28 =item I<filename.xml>
29
30 The (optional) filename that you want to write the XML output to.
31 If not specified, the XML will be printed to stdout.
32
33 =item B<--header>|B<-h> {none,xsd,dtd}
34
35 By default RRDtool will add a dtd header to the xml file. Here
36 you can customize this to and xsd header or no header at all.
37
38
39 =item B<--no-header>
40
41 A shortcut for S<--header=none>.
42
43 If you want to restore the dump with RRDtool 1.2 you should use the
44 S<--no-header> option since 1.2 can not deal with xml headers.
45
46 =item B<--daemon> I<address>
47
48 Address of the L<rrdcached> daemon. If specified, a C<flush> command is sent
49 to the server before reading the RRD files. This allows B<rrdtool> to return
50 fresh data even if the daemon is configured to cache values for a long time.
51 For a list of accepted formats, see the B<-l> option in the L<rrdcached> manual.
52
53  rrdtool dump --daemon unix:/var/run/rrdcached.sock /var/lib/rrd/foo.rrd
54
55 =back
56
57 =head1 EXAMPLES
58
59 To transfer an RRD between architectures, follow these steps:
60
61 =over 4
62
63 =item 1.
64
65 On the same system where the RRD was created, use B<rrdtool> B<dump>
66 to export the data to XML format.
67
68 =item 2.
69
70 Transfer the XML dump to the target system.
71
72 =item 3.
73
74 Run B<rrdtool> B<restore> to create a new RRD from the XML dump. See
75 B<rrdrestore> for details.
76
77 =back
78
79 =head1 ENVIRONMENT VARIABLES
80
81 The following environment variables may be used to change the behavior of
82 C<rrdtoolE<nbsp>dump>:
83
84 =over 4
85
86 =item B<RRDCACHED_ADDRESS>
87
88 If this environment variable is set it will have the same effect as specifying
89 the C<--daemon> option on the command line. If both are present, the command
90 line argument takes precedence.
91
92 =back
93
94 =head1 AUTHOR
95
96 Tobias Oetiker E<lt>tobi@oetiker.chE<gt>
97