Hi,
I'm migrating from a 64-Bit system to a 32-bit system and I'm having some issues with the RRD's. Everything is transferred over to the new box and working correctly, however, when I move the .rrd files over and try to access, I get in the Apache error.log:
ERROR: This RRD was created on other architecture
Any ideas on this? If I can't use these RRD's, can I recreate them? I don't want to lose any data (all transferred over in MYSQL no problem)....
Thanks in advance...
RRD Import or Re-Create
Moderators: Developers, Moderators
Spoke too soon:sterpstra wrote:Thanks gandalf....
That helps a bunch but I can't find a way to do all files in batch type format I have over a thousand RRD's.. I'd hate to do them one by one....
-st
#!/bin/bash
for name in $(find -type f -print | grep .rrd)
do
if [ $name != "." ] ; then
echo "Dumping "$name" to $name.xml"
rrdtool dump "$name" > "$name.xml"
fi
done
Yeah, after you told me about the RRDTool, I was able to search correctly and find what I needed. I wasn't getting anything before with the way I was searching. I did end up using a different shell script which worked out better:gandalf wrote:I already wondered. This was posted some time ago in virtually the same way you did it
Reinhard
#!/bin/sh
ECHO="echo -e"
rrdump ()
{
for rrd in `find . -type f -name "*.rrd"`
do
xml=`echo $rrd | sed 's/.rrd//g'`
rrdtool dump $rrd > $xml.xml
rm $rrd
done
}
xmlimport ()
{
for xml in `find . -type f -name "*.xml"`
do
rrd=`echo $xml | sed 's/.xml//g'`
rrdtool restore $xml $rrd.rrd
rm $xml
done
}
case "$1" in
dump)
rrdump
;;
import)
xmlimport
;;
*)
$ECHO "$0 takes one of two arguments\n"
$ECHO "$0 dump -- dumps contents to xml\n"
$ECHO "$0 import -- imports xml files to rrd\n"
;;
esac
Who is online
Users browsing this forum: No registered users and 3 guests