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.txtSort all files from newest to oldest:# cat /tmp/backup_contents.txt | sort -k4 -r > /tmp/backup_contents_date_sorted.txtSort all files from largest to smallest:# cat /tmp/backup_contents.txt | sort -k3 -n -r > /tmp/backup_contents_size_sorted.txtCounting how many RRD folders + files there are:# grep "var/airwave/rrd" /tmp/backup_contents.txt | wcDetermining 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) }'
© Copyright 2024 Hewlett Packard Enterprise Development LPAll Rights Reserved.