Quantcast
Channel: R&D Forums
Viewing all articles
Browse latest Browse all 9951

Veeam Backup & Replication • Re: Portal reports of Used space after space savings

$
0
0
Thanks for your reply Fabian

We are currently using a script that looks something like below.
Are there any technical or security issues that prevent you from using something similar on your Linux based Storage Appliances? Of course it would be great to get this as an optional report in the portal, but to begin with, at least have it as a native script in the appliance?

cheers
/björn

--------


#!/bin/bash
cd /opt/usage
mv /opt/usage/output.txt /opt/usage/old-reports/.

rm /opt/usage/*30.txt
for clientDir in `find /backups/disk-01/hardrepo30/ -mindepth 1 -maxdepth 6 -typed`
do
echo $clientDir
clientSpaceUsed=$(find $clientDir/* -xdev -type f -exec xfs_bmap -l {} + | awk '{ print $3 " " $4 }' | sort -k 1 | uniq | awk '{ print $2 }' | grep -Eo '[0-9]{1,7}' | paste -sd+ | bc | awk '{print $1*512/1024/1024/1024}')
#block sizes of 512 bytes. Divided by 1024 for KB. Divided by 1024 for MB.
echo "$clientDir:$clientSpaceUsed GB" >> report$(date +'%m%d%Y')-30.txt
done
rm /opt/usage/*60.txt
for clientDir in `find /backups/disk-01/hardrepo60/ -mindepth 1 -maxdepth 1 -typed`
do
echo $clientDir
clientSpaceUsed=$(find $clientDir/* -xdev -type f -exec xfs_bmap -l {} + | awk '{ print $3 " " $4 }' | sort -k 1 | uniq | awk '{ print $2 }' | grep -Eo '[0- 9]{1,7}' | paste -sd+ | bc | awk '{print $1*512/1024/1024/1024}')
#block sizes of 512 bytes. Divided by 1024 for KB. Divided by 1024 for MB.
echo "$clientDir:$clientSpaceUsed GB" >> report$(date +'%m%d%Y')-60.txt
done
cat *7.txt *14.txt *30.txt *60.txt > report$(date +'%m%d%Y').txt

cp report$(date +'%m%d%Y').txt output.txt

Statistics: Posted by hovmaster105 — Apr 04, 2025 9:30 am



Viewing all articles
Browse latest Browse all 9951

Latest Images

Trending Articles



Latest Images