Monitoring, Management & Location Tracking

 View Only
last person joined: one year ago 

Articles relating to existing and legacy HPE Aruba Networking products and solutions including AirWave, Meridian Apps, ALE, Central / HPE Aruba Networking Central, and UXI / HPE Aruba Networking User Experience Insight

Viewing the contents of a nightly backup file 

Jun 25, 2014 06:57 PM

You can use the below commands to view the contents of a nightly backup. This is helpful if you want to see the largest files in the backup, how many files there are of one type, or finding files that haven't been modified recently.

Export the backup's contents to a text file:
# tar -ztvf /var/airwave-backup/nightly_data001.tar.gz > /tmp/backup_contents.txt

Sort all files from newest to oldest:
# cat /tmp/backup_contents.txt | sort -k4 -r > /tmp/backup_contents_date_sorted.txt

Sort all files from largest to smallest:
# cat /tmp/backup_contents.txt | sort -k3 -n -r > /tmp/backup_contents_size_sorted.txt

Counting how many RRD folders + files there are:
# grep "var/airwave/rrd" /tmp/backup_contents.txt | wc

Determining how much uncompressed disk space all RRD files are taking:
# grep "var/airwave/rrd" /tmp/backup_contents.txt | awk 'BEGIN {sum=0} {sum+=$3} END { prinf("%d MB
",sum/1024/1024) }'

Statistics
0 Favorited
0 Views
0 Files
0 Shares
0 Downloads

Related Entries and Links

No Related Resource entered.