RRDcached patch. This implements an infrastructure, where rrd updates can be
[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>
8 S<[B<--no-header>|B<-n>]>
9 S<[B<--daemon> I<address>]>
10 S<E<gt> I<filename.xml>>
11
12 or 
13
14 B<rrdtool> B<dump> I<filename.rrd> I<filename.xml>
15 S<[B<--no-header>|B<-n>]>
16 S<[B<--daemon> I<address>]>
17
18 =head1 DESCRIPTION
19
20 The B<dump> function writes the contents of an B<RRD> in human
21 readable (?) XML format to a file or to stdout. This format can
22 be read by rrdrestore. Together they allow you to transfer your
23 files from one computer architecture to another as well to
24 manipulate the contents of an B<RRD> file in a somewhat more
25 convenient manner.
26
27
28 =over 8
29
30 =item I<filename.rrd>
31
32 The name of the B<RRD> you want to dump.
33
34 =item I<filename.xml>
35
36 The (optional) filename that you want to write the XML output to.
37 If not specified, the XML will be printed to stdout.
38
39 =item B<--no-header>|B<-n>
40
41 In rrdtool 1.3, the dump function started producing correct xml-headers.
42 Unfortunately the rrdtool restore function from the 1.2 series can not
43 handle these headers. With this option you can supress the creatinon of
44 the 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. To
51 specify a UNIX domain socket use the prefix C<unix:>, see example below. Other
52 addresses are interpreted as normal network addresses, i.E<nbsp>e. IPv4 or IPv6
53 addresses in most cases.
54
55  rrdtool dump --daemon unix:/var/run/rrdcached.sock /var/lib/rrd/foo.rrd
56
57 =back
58
59 =head1 EXAMPLES
60
61 To transfer an RRD between architectures, follow these steps:
62
63 =over 4
64
65 =item 1.
66
67 On the same system where the RRD was created, use B<rrdtool> B<dump>
68 to export the data to XML format.
69
70 =item 2.
71
72 Transfer the XML dump to the target system.
73
74 =item 3.
75
76 Run B<rrdtool> B<restore> to create a new RRD from the XML dump. See
77 B<rrdrestore> for details.
78
79 =back
80
81 =head1 ENVIRONMENT VARIABLES
82
83 The following environment variables may be used to change the behavior of
84 C<rrdtoolE<nbsp>dump>:
85
86 =over 4
87
88 =item B<RRDCACHED_ADDRESS>
89
90 If this environment variable is set it will have the same effect as specifying
91 the C<--daemon> option on the command line. If both are present, the command
92 line argument takes precedence.
93
94 =back
95
96 =head1 AUTHOR
97
98 Tobias Oetiker E<lt>tobi@oetiker.chE<gt>
99