This is my first post, but I've been actively reading for several months. I've tried searching the fora for the solution below but couldn't find it completely. I decided to put this together in hopes that it will help someone else. If this is elsewhere out there, please accept my apologies.
I recently decided to switch my Cacti server from CentOS 5 to Windows. This was done primarily because others in my organization have more experience with Windows and they need to administer this too. I had a lot of data in my Linux instance that I did not want to loose. Figuring out how to move the SQL data from one server to the other was pretty easy and in reality moving the rrd files one by one was easy but I had 26 hosts and over 230 rrd files so I really didn't want to do all of these by hand. I looked for some scripts and found a couple that helped go from Windows to Linux (http://forums.cacti.net/post-78443.html
) but none to go back. I also found that just changing the windows script to restore from dump didn't help since the restore command needs to have the .rrd extension specified at the end. I have had experience in many of my jobs with writing scripts to make my jobs easier so I embarked on this task.
I have attached a zip with two files. First is the windows script to import the xml files. I wrote it in WScript so all you should need to do is run Importrrd.vbs from the command line. You will need to edit the script to change the variables at the top to reflect your install. The second file is a bash script to dump all the rrds from the linux cacti instance and then tar them up. All you need to do is update the variables at the top of the file with the location of your install and then make the file executable. When you run the file, it will dump all the rrds out to the directory you chose, tar them up and then clean them up from the directory.
While I've used this several times on my system with success, I won't be responsible if it causes issues with your system. My next thing to try is to create this using Windows PowerShell. The scripting is much simpler with PS but since it's newer to me it will take me longer. Once I have the PS script done, I'll post it too for those interested. If you have problems, let me know and I'll try to help you with them.