buried more whitesapce
[torrus-plus.git] / src / doc / manpages / torrus_configsnapshot.pod.in
blob1e5433a9786ec0f6c6d3bd63258b7ef874b3e6c2
1 #  Copyright (C) 2004  Stanislav Sinyagin
3 #  This program is free software; you can redistribute it and/or modify
4 #  it under the terms of the GNU General Public License as published by
5 #  the Free Software Foundation; either version 2 of the License, or
6 #  (at your option) any later version.
8 #  This program is distributed in the hope that it will be useful,
9 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
10 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 #  GNU General Public License for more details.
13 #  You should have received a copy of the GNU General Public License
14 #  along with this program; if not, write to the Free Software
15 #  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
17 # Stanislav Sinyagin <ssinyagin@yahoo.com>
21 =head1 NAME
23 configsnapshot - Generates a configuration snapshot for a Torrus tree.
25 =head1 SYNOPSIS
27 B<torrus configsnapshot> --tree=I<TREENAME> [I<options...>]
29 =head1 DESCRIPTION
31 This command generates a configuration snapshot from current
32 datasources for tree I<TREENAME>. The output is an XML file, ready for
33 compilation, representing all datasources, monitors and tokensets of a
34 given tree. The snapshot does not include view definitions. Templates
35 and file patterns are expanded inside the file. It does not require
36 any other XML configuration files, except for F<defaults.xml> and your
37 custom view definitions.
39 B<Warning:> C<configsnapshot> from RRFW release 0.1.5 will not work
40 correctly with databases from previous releases. Use RRFW release
41 C<0.1.4bf2> instead.  C<configsnapshot> utility from RRFW release 0.1.4bf2
42 does not preserve aliases.
44 This utility is useful in Torrus upgrade process. In case when RRD files
45 structure is changing in Torrus default templates, and user(s) demand to
46 preserve the historical data, the following steps could be done:
48 =over 4
50 =item *
52 Stop the collector and monitor processes.
54 =item *
56 Install newest Torrus software and do not run C<compilexml> immediately.
58 =item *
60 Create snapshots of the trees that you want to preserve for historical reasons:
62   torrus configsnapshot --tree=myrouters \
63     --out=@sitexmldir@/myrouters-snapshot.xml
65 =item *
67 If needed, move the existing RRD files into different directory. Then
68 change the C<data-dir> parameters in the snapshot XML accordingly.
70 =item *
72 Create a new tree with only the snapshot file in it. Compile the tree.
74 =item *
76 At this stage, it is up to the user to decide wether to continue running the
77 collector and monitor daemons for this new tree. The old data may be preserved
78 for historical reference, and collector may be run with the newest tree
79 structure and definitions.
81 =back
83 =head1 OPTIONS
85 =over 4
87 =item B<--tree>=I<TREE>
89 Mandatory parameter specifying the tree name.
91 =item B<--out>=I<FILE>
93 Sets the output file to I<FILE>. Default is F<snapshot.xml>.
95 =item B<--param>=I<PARAM>  B<--value>=I<VALUE>
97 Sets the filter on datasource leaves that have to be included in the snapshot.
98 I<PARAM> specifies the name of the datasource parameter, and I<VALUE>
99 sets the matching value. By default the numeric comparison is performed.
101 =item B<--op>=I<OPERATOR>
103 Sets the fiter comparison operator. Accepted values: B<=> (numeric),
104 B<eq> (text string comparison), and B<re> (regular expression match). Default
105 is numeric comparison.
108 =item B<--verbose>
110 Displays some extra information.
112 =item B<--help>
114 Displays a help message.
116 =back
118 =head1 FILES
120 =over 4
122 =item F<@distxmldir@/defaults.xml>
124 XML configuration file with default settings for the datasources and
125 tokensets, as well as default view definitions.
127 =item F<snapshot.xml>
129 Default B<configsnapshot> output file.
131 =back
133 =head1 SEE ALSO
135 L<torrus(@mansec_usercmd@)>, L<torrus_compilexml(@mansec_usercmd@)>
137 =head1 NOTES
139 See more documentation at Torrus home page: http://torrus.org
141 =head1 AUTHOR
143 Stanislav Sinyagin E<lt>ssinyagin@yahoo.comE<gt>