>There may be a workaround thought: if you use 'rrdtool dump', you will
>get a (large) XML file with all of the data. You should be able to
>then use 'rrdtool restore' to read this back into the new .rrd file.
But since you probably have hundreds or thousands of rrd files, you need
some automation. So use a script like the below saved as dumprestore.
Run "dumprestore dump | /bin/sh" from your rrd_rootdir on the old
system. This will write a .xml for each .rrd. Then rsync all the .xml
files to new machine and run "dumprestore restore | /bin/sh". After you
confirm it is working you can find . -name '*.xml' -exec rm -f {} \; to
clean up.
-twitham
#!/usr/bin/perl
use warnings;
sub oops {
die "$0 dump|restore\n";
}
my $what = shift @ARGV or &oops;
my $in = 0;
$in = 'rrd' if $what eq 'dump';
$in = 'xml' if $what eq 'restore';
&oops unless $in;
open PIPE, "find . -name '*.$in' -print |" or die $!;
while (<PIPE>) {
chomp;
my $in = $_;
my $out = $in;
$out =~ s/\.rrd$/\.xml/ or $out =~ s/\.xml$/\.rrd/;
print "rrdtool $what $in ", $out =~ /xml$/ ? '> ' : '', "$out\n";
print "touch -r $in $out\n";
}
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Ganglia-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ganglia-general