I have write a simple shell script to show how many backup have been created for the account and listing the backup. The script is for my own use and my own note. I is very usefull if you have many backup and want simpler way to check the backup availability instead using WHM.
#!/bin/bash # Shell script to check backup availability echo "" echo Shell script to check backup availability read -p 'Username: ' username echo There are find /backup/*/*/accounts/ -maxdepth 1 -name $username* | wc -l echo Backup available for $username echo "" echo Backup available for $username as below : echo "Weekly" ls -lath /backup/weekly/*/accounts/$username* echo "Monthly" ls -lath /backup/monthly/*/accounts/$username*
[root@wp4 backup]# ./backup-available.sh Shell script to check backup availability Username: inertz There are 2 Backup available for inertz Backup available for inertz as below : Weekly -rw------- 1 root root 3.6G Nov 5 10:47 /backup/weekly/2022-11-05/accounts/inertz.tar.gz Monthly -rw------- 1 root root 3.6G Oct 15 10:57 /backup/monthly/2022-10-15/accounts/inertz.tar.gz