<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
It would be nice if Hobbit came with a tool, that you could run on your
bb servers rrd directory, or a copy of it, and it would automagically
copy the data to the host-based subdirs that hobbit uses. <br>
<br>
I have a BB server that has been running for about 1.5 years. I have a
Hobbit server I have been running in unison for several months, (via
the BBRELAY option on the bb server).  Soon I am going to totally
decommission the bb server and use only the Hobbit server.<br>
<br>
However, I do not wish to lose the trends history that the bb server
has. Is there any sort of tool to migrate the rrd data from bb to
hobbit? I started doing it manually, and it wasn't very fun.<br>
<br>
The method I used to move the memory rrd data over is:<br>
<br>
First off, I noticed that the directory structure of the
~hobbit/data/rrd directories and files  is different from the
~bb/bbvar/rrd directories and files:<br>
<br>
<tt>[<b>hobbit</b>]$ ls data/rrd/host.my-domain.net  #Note that hobbit
stores the rrds in subdirs<br>
<b></b>disk,bigdisk.rrd   <b>memory.physical.rrd</b> 
tcp.http.host.my-domain.net,.rrd<br>
disk,boot.rrd      <b>memory.real.rrd</b>     
tcp.http.host.my-domain.net.rrd<br>
disk,root.rrd      <b>memory.swap.rrd</b>      tcp.ssh.rrd<br>
la.rrd             procs.rrd            users.rrd<br>
<b>memory.actual.rrd</b>  tcp.conn.rrd<br>
<font color="red">(Hmm it looks like there is a duplicate
tcp.http.host.my-domain.net,|.rrd? No idea where that came from, but I
digress.)</font><br>
<br>
[<b>bbhost</b>]$ ls bbvar/rrd |grep host     #Note that bb stores all
of the rrds in one dir<br>
host.my-domain.net.disk,bigdisk.rrd<br>
host.my-domain.net.disk,boot.rrd<br>
host.my-domain.net.disk,root.rrd<br>
host.my-domain.net.la.rrd<br>
<b>host,my-domain,net.memory.actual.rrd<br>
host,my-domain,net.memory.physical.rrd<br>
host,my-domain,net.memory.real.rrd<br>
host,my-domain,net.memory.swap.rrd</b><br>
host.my-domain.net.procs.rrd<br>
host.my-domain.net.tcp.conn.rrd<br>
host.my-domain.net.tcp.http.host.my-domain.net.rrd<br>
host.my-domain.net.tcp.ssh.rrd<br>
host.my-domain.net.users.rrd<br>
<br>
</tt>So it looks like on the bbhost, for some reason, the host name is
comma delimited....but only for the memory rrd files? This is strange.
Ah well I just need to get them to the hobbit server, and with the
proper filenames, and in the proper subdirs. So I scp'd all of the
memory rrd files to the hobbit server into /tmp/mem, and then:<br>
<br>
[hobbit] $ cd ~hobbit/data/rrd; for hostdir in `ls`; do BBHOST=`echo
$hostdir|sed 's/\./,/g'`; cp -vf /tmp/mem/$BBHOST.memory.real.rrd
$hostdir/memory.real.rrd; done  <br>
<br>
 I repeated this command for the "swap", "actual", and "real" files.<br>
The sed command was to generate the comma-delimited filenames I needed
to find the files. This command copied all of the memory rrd files into
the proper subdirs.<br>
<br>
I'm not sure why only the memory rrd files on my bb server are
comma-delimited.  Maybe some misconfiguration I did in the past? The
memory graphs look normal in the trends column though...ah well.<br>
<br>
</body>
</html>