Created
June 12, 2016 17:25
-
-
Save Strykar/95e730a7d7cb801758c9afa9b9f16a73 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Two examples for batch conversion of RRD to XML (done on the host the RRD were created on) | |
# Convert from XML back to RRD on the new host/arch | |
for f in *.rrd; do rrdtool dump ${f} > ${f}.xml; done | |
for f in *.xml; do rrdtool restore ${f} `echo ${f} | cut -f1 -d .`.rrd; done | |
find /tmp/data -type f -iname '*.rrd' -print0|while IFS= read -r -d '' f; do rrdtool dump ${f} > ${f}.xml; done | |
find /tmp/data -type f -iname '*.xml' -print0|while IFS= read -r -d '' f; do rrdtool restore ${f} `echo ${f} | cut -f1 -d .`.rrd -f; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment