[mrtg] Re: rrdtool dump script

Tobias Oetiker oetiker at ee.ethz.ch
Fri Jul 11 00:16:19 MEST 2003


Yesterday Eric Garnel wrote:

> I am in the (slow) proccess of migating off an i386 redhat box to a
> ppc yellowdog box and need to convert many rrdfiles for the new
> architecture.
>
> In order to move my rrd files over, I have to dump them out to xml,
> scp them over and then do an rrd restore on the xml files.
>
> Has anyone come across a script that would dump all the rrd files
> (lots) into their respective files at once? as well as a similar
> script to restore them?

for x in `find . -name '*.rrd'`; do
cd `dirname $x` && rrdtool dump `basename $x` `basename $x .rrd`.xml
done

or something like this (sh/bash/zsh/ksh)

for csh tcsh it would be

foreach x (`find . -name '*.rrd'`)
cd `dirname $x` && rrdtool dump `basename $x` `basename $x .rrd`.xml
end

cheers
tobi



> Thanks.
>
> Eric
>
> =====
>
> Eric Garnel CCNP, MCSE
>
>
>
> eric at garnel.com
>
>
>
>
>
> --
> Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
> Archive     http://www.ee.ethz.ch/~slist/mrtg
> FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
> WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi
>

-- 
 ______    __   _
/_  __/_  / /  (_) Oetiker @ ISG.EE, ETZ J97, ETH, CH-8092 Zurich
 / // _ \/ _ \/ /  System Manager, Time Lord, Coder, Designer, Coach
/_/ \.__/_.__/_/   http://people.ee.ethz.ch/~oetiker   +41(0)1-632-5286

--
Unsubscribe mailto:mrtg-request at list.ee.ethz.ch?subject=unsubscribe
Archive     http://www.ee.ethz.ch/~slist/mrtg
FAQ         http://faq.mrtg.org    Homepage     http://www.mrtg.org
WebAdmin    http://www.ee.ethz.ch/~slist/lsg2.cgi



More information about the mrtg mailing list