{"id":2107,"date":"2025-04-12T23:23:58","date_gmt":"2025-04-12T22:23:58","guid":{"rendered":"https:\/\/www.hutsky.cz\/blog\/?p=2107"},"modified":"2025-04-12T23:23:59","modified_gmt":"2025-04-12T22:23:59","slug":"rrd-migration-to-different-architecture","status":"publish","type":"post","link":"https:\/\/www.hutsky.cz\/blog\/2025\/04\/rrd-migration-to-different-architecture\/","title":{"rendered":"RRD migration to different architecture"},"content":{"rendered":"\n<p>I have this old machine with an Atom CPU where I installed Debian in 2011 and it&#8217;s been running ever since (I just upgrade it to the next major version every two years). One time, I had to replace failing power supply but other than that, it&#8217;s been running without any issues ever since. Over time, it&#8217;s been used for various purposes, most of them can be performed by a Raspberry these days but why throw something away if it works.<\/p>\n\n\n\n<p>But of course, the fifteen year old Atom CPU D510 can&#8217;t do too much heavy lifting these days so while the machine still serves its purpose like storing some offsite backups, I recently decided to move some of the functionality from this machine somewhere else to allow it to catch some breath.<\/p>\n\n\n\n<p>One of those were a bunch of RRD graphs in which I was storing some metrics. But when I moved those somewhere else, the graphs simply wouldn&#8217;t display. To my great surprise, I found out that RRD format is architecture sensitive. Even though the CPU is 64-bit, this old Atom box of mine is running a 32-bit system, I don&#8217;t really remember why but the system has just 2 GB of RAM and I guess back in 2011 when I was installing it, it wouldn&#8217;t been too uncommon to pick the 32-bit version for such a machine.<\/p>\n\n\n\n<p>Anyway, as a result, when I simply took the RRD graphs and moved them somewhere else (somewhere else was 64-bit naturally these days), it didn&#8217;t work. What I had to do was to dump all the RRD files to the arch-agnostic XML format on my old 32-bit box (<strong>please be aware of the rm part that removes the RRD files, best try it on a copy of the data<\/strong>): <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>for i in `find . -type f -name \"*.rrd\"`; do rrdtool dump $i &gt; $(dirname $i)\/$(basename -s '.rrd' $i).xml; rm $i; done<\/code><\/pre>\n\n\n\n<p>Then migrate those dumps over and convert them back from XML to RRD on the new 64-bit box:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>for i in `find . -type f -name \"*.xml\"`; do rrdtool restore $i $(dirname $i)\/$(basename -s '.xml' $i).rrd; rm $i; done<\/code><\/pre>\n\n\n\n<p>Now the RRD files would work on the new system as well.<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>I have this old machine with an Atom CPU where I installed Debian in 2011 and it&#8217;s been running ever since (I just upgrade it to the next major version every two years). One time, I had to replace failing &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"more-link\" href=\"https:\/\/www.hutsky.cz\/blog\/2025\/04\/rrd-migration-to-different-architecture\/\"> <span class=\"screen-reader-text\">RRD migration to different architecture<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,22],"tags":[10,48,18,13,42],"class_list":["post-2107","post","type-post","status-publish","format-standard","hentry","category-operatingsystems","category-web-related","tag-debian","tag-hardware","tag-linux","tag-os","tag-web"],"_links":{"self":[{"href":"https:\/\/www.hutsky.cz\/blog\/wp-json\/wp\/v2\/posts\/2107","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hutsky.cz\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.hutsky.cz\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.hutsky.cz\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hutsky.cz\/blog\/wp-json\/wp\/v2\/comments?post=2107"}],"version-history":[{"count":12,"href":"https:\/\/www.hutsky.cz\/blog\/wp-json\/wp\/v2\/posts\/2107\/revisions"}],"predecessor-version":[{"id":2124,"href":"https:\/\/www.hutsky.cz\/blog\/wp-json\/wp\/v2\/posts\/2107\/revisions\/2124"}],"wp:attachment":[{"href":"https:\/\/www.hutsky.cz\/blog\/wp-json\/wp\/v2\/media?parent=2107"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.hutsky.cz\/blog\/wp-json\/wp\/v2\/categories?post=2107"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.hutsky.cz\/blog\/wp-json\/wp\/v2\/tags?post=2107"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}