1. Home
  2. Blog
  3. Blog Post
Santanu
Santanu

General

Migrating rrd database between different architecture

Another Tech note

A description of cover image.

This script you run on the source host from the same directory where all those rrd files are there. I found this very helpful while migrating between Linux and Solaris.

  #/bin/csh
  set all_files=`echo *.rrd`
  echo $all_files
  foreach file ( $all_files )
  set base = `basename $file .rrd`
  /bin/rrdtool dump $file > /tmp/new1/$base.xml
  end

The do a `tar` with `gzip` as that will save lots of space and time while transferring data between machines.

And on the destination machine you uncompress and untar the file to an empty directory.

    #/bin/csh
    set all_files=`echo *.xml`
    echo $all_files
    foreach file ($all_files)
    set base = `basename $file .xml`
    /opt/local/bin/rrdtool restore $file /opt/local/htdocs/cacti/rra/$base.rrd
    end

Hope this helps.

Read Next

26 Sept   2005
5 Oct   2005

French class

2005-10-05-french-class