Migrating to a system with a different architecture¶
RRDtool is not architecture-agnostic, and will require you to dump and restore the RRD contents to XML prior to being able to use them. I'm migrating the installation from sphere to phobos, so replace those names with your own machines in the rest of this article.
SSH key generation¶
If you don't have ssh keys to log in to your old machine, be prepared to type your password a few hundred to thousand times...
phobos:/opt/observium# ssh-keygen -t rsa Generating public/private rsa key pair. Enter file in which to save the key (/root/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /root/.ssh/id_rsa. Your public key has been saved in /root/.ssh/id_rsa.pub. The key fingerprint is: 00:ba:9c:40:f8:c9:5d:8a:c3:6e:87:b9:57:34:65:de root@phobos The key's randomart image is: +--[ RSA 2048]----+ |.. . | |o . .. o | |.+.+ o.+ . | | oBoo o.. E | | .++ . .S | | = . . | | . o . | | . . | | . | +-----------------+ phobos:/opt/observium# ssh-copy-id sphere Password:
Now try logging into the machine, with "ssh 'sphere'", and check in:
to make sure we haven't added extra keys that you weren't expecting.
Start the dump/restore process¶
phobos:/opt/observium# for i in `find . -name *.rrd`; do ssh sphere rrdtool dump /opt/observium/$i > /tmp/$(basename $i) rm $i rrdtool restore /tmp/$(basename $i) $i rm /tmp/$(basename $i) done