Created
June 12, 2013 07:17
-
-
Save unicolet/5763403 to your computer and use it in GitHub Desktop.
Script to archive all 'old format' drive information collected by opennms for Windows systems. Opennms > 1.10 will collect this data in a directory named after the drive letter (A,B,C, and so on) instead of the drive index.
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
/usr/bin/find /opt/opennms/share/rrd/snmp/ -wholename "*/hrStorageIndex/[12345]" -type d | /bin/tar -cf old_drive_info.tar --files-from - | |
/usr/bin/find /opt/opennms/share/rrd/snmp/ -wholename "*/hrStorageIndex/[12345]" -type d | /usr/bin/xargs /bin/rm -rf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment