[hobbit] Moving to new Hobbit server

David Pullman dpullman at mel.nist.gov
Wed Mar 1 04:34:34 CET 2006



ZanDAhaR wrote:
> If I do a uname -m they both say i686, uname -p one says unknown other 
> says athlon. Should this be an issue ? Also if they are different enough 
> will the graphs just not work or be corrupted or not update ? Can 
> someone please assist me in how to import/export the rrd files then as I 
> have never done that before. Been looking in the rrd docs but still not 
> entirely sure what I need/want.

If there is a problem, you'll know real quick if you start the new 
server and there are errors in your rrd-data.log.  It will report an 
error updating every file and say something about the file having been 
created on another architecture.

I did an rsync of everything and did some trial runs with the new 
server, saw those errors, and realized I had to convert.

It was something along the lines of using rrdtool dump, which makes xml 
files, rsyncing them over, then doing a rrdtool restore.  I did two 
shell scripts, one on each server, and I just did the rsync command to 
copy only .xml.  I don't have the first script, since that box got 
recycled, but the second one was still around.

1.  Use a script to descend into the rrd directories for each host, and 
do a rrdtool dump for each .rrd file.  That will make an xml file for 
each test for each host.

2. rsync the .xml files over.

3. Use a script to descend into the dirctories and usr rrdtool restore 
for each xml file to make an rrd file.

(My distro of rrdtool does not include rrddump, although the man pages 
refer to it.  But rrdtool dump apparently does the same thing.)

Here's a sample script on the receiving end.  Our host names end in 
.gov.  I did it as root, so I had to add a chown in the script.

#!/bin/sh

RRDDIR="/opt/hobbit/data/rrd"

cd $RRDDIR

for HOST in *.gov
do
         cd $HOST

         for f in *.xml
            do
                 echo $HOST
                 b=`echo $f | sed 's/\.xml//'`
                 `rrdtool restore $f $b.rrd`
                 chown hobbit:hobbit $b.rrd
            done
         cd $RRDDIR
done

--David



More information about the Xymon mailing list