Import RRD file From win32
Moderators: Developers, Moderators
Import RRD file From win32
I just re installed cacti on a Debian 3.1, and i'd like to import my old .RRD files from a win32 server.
So i copy them via scp in /var/lib/cacti/rra, i set the good permissions and owner, but nothing changes in cacti...
So my questions are:
1) Did i missed something?
2) Is it possible to import some w32files on linux, and still be readable?
Thanks,
So i copy them via scp in /var/lib/cacti/rra, i set the good permissions and owner, but nothing changes in cacti...
So my questions are:
1) Did i missed something?
2) Is it possible to import some w32files on linux, and still be readable?
Thanks,
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Re: Import RRD file From win32
Were those files part of an old cacti install? Then you'll have to export/import the cacti db to show those rrd filesDecombej wrote:I just re installed cacti on a Debian 3.1, and i'd like to import my old .RRD files from a win32 server.
If those are pure external rrd's (not known by and not updated by cacti), please follow http://forums.cacti.net/viewtopic.php?t=12202. And pay attention: When copying rrd files between architectures, you'll get a problem. Instead, export/import themSo i copy them via scp in /var/lib/cacti/rra, i set the good permissions and owner, but nothing changes in cacti...
Reinhard
HOWTO: Import/export Cacti DB and RRDs
I had to migrate Cacti from a Windows to a Linux Based OS, i chose a Debian 3.1.
I met some difficulties when migrating old cacti data to the new server, i just copied rrd files via scp, set the correct permissions on the files, so the poller can read/write on rrds, and nothing happened.
With some searchs, i found that i had to import/exports rrds and the database (especially if you change your rrdtool version.)
To Import/Export RRDs (All datas are copied on the new server, let's say a temp directory):
Be carefull to put the full path of rrdtool (in "...{print "rrdtool dump "$1..." if you have more than one version installed)
and to restore:
Copy the new data to your rra directory, verify the permissions on the files (chown cactiuser /var/www/cacti/rra/* (user used to run the poller))
You now have to dump the old cacti db on the old server:
and import it on the new server:
It's best to dump only some tables, in order to keep the settings table for exemple.
for that:
You'll have to delete the table you want to replace before importing, or use the "--add-drop-table" option to mysqldump when exporting, like this:
But be carefull whit that...
In any case, do a backup before every step...
Hopping it'll be usefull for someone.
Long live Cacti and it's community!
I met some difficulties when migrating old cacti data to the new server, i just copied rrd files via scp, set the correct permissions on the files, so the poller can read/write on rrds, and nothing happened.
With some searchs, i found that i had to import/exports rrds and the database (especially if you change your rrdtool version.)
To Import/Export RRDs (All datas are copied on the new server, let's say a temp directory):
Code: Select all
ls -1 *.rrd | awk '{print "rrdtool dump "$1" > "$1".xml"}' | sh -x
and to restore:
Code: Select all
ls -1 *.rrd.xml | sed 's/\.xml//' | awk '{print "rrdtool restore "$1".xml "$1}' | sh -x
You now have to dump the old cacti db on the old server:
Code: Select all
mysqldump -u user -p oldcactidb > cacti_export.sql
Code: Select all
mysql -u user -p newcactidb < cacti_export.sql
for that:
Code: Select all
mysqldump -u user -p oldcactidb tables > cacti_table_export.sql
Code: Select all
mysqldump --add-drop-table -u user -p oldcactidb > cacti_export.sql
In any case, do a backup before every step...
Hopping it'll be usefull for someone.
Long live Cacti and it's community!
Who is online
Users browsing this forum: No registered users and 0 guests