They are very dirty but they work.
On the win32 side
open a file
put this line into it
Code: Select all
FOR /R E:\your\path\to\cacti\rra %%f IN (*.*) DO rrdtool dump %%f > %%f.xml
it produces files like <ds-name>.rrd.xml. it will produce some errors for files in the rra-folder that arent rrd-files. but this is no problem.
afterwards mount the windows-folder in your linux box
edit the following script for your needs
mounted is the folder where your cacti/rra Folder is mounted
cactipath is where your new rra-folder is on your linuxbox.
Code: Select all
#!/bin/bash
#import xml 2 rrd
cactipath='/your/path/to/cacti/rra'
mounted='/mnt/somedrive'
files=$(ls $mounted | grep .xml | cut -d "." -f 1 )
for i in $files; do
rrdtool restore "$mounted/$i.rrd.xml" "$cactipath/$i.rrd"
echo "$i.xml nach $cactipath/$i.rrd importiert"
done
your rrd-files should be in your cacti/rra folder
greez jan