Monitoring, Management & Location Tracking

Viewing the contents of a nightly backup file

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\n",sum/1024/1024) }'

Version history
Revision #:
1 of 1
Last update:
‎06-25-2014 03:57 PM
Updated by:
 
Labels (1)
Contributors
Search Airheads
Showing results for 
Search instead for 
Did you mean: 
Is this a frequent problem?

Request an official Aruba knowledge base article to be written by our experts.