Command & Development/Shell Script

[ShellScript] Avamar Backup Check

Richard.Ryu 2023. 7. 17. 12:01
반응형

Avamar Backup Check를 위한 스크립트입니다.

 

직접 웹에서 확인하기 불편해서 만들었습니다.

 

주의 : 최근 백업한 내용을 보여주기때문에 일자별 확인 필요합니다.

#!/bin/bash
1_Avamar="111.111.111.111"
2_Avamar="111.111.111.111"
3_Avamar="111.111.111.111"
4_Avamar="111.111.111.111"
5_Avamar="111.111.111.111"

	ID=" "
	PW=" "
	
		echo "==========================================================================="
        echo "=============================1 Avamar Check================================"
        echo "==========================================================================="
        sshpass -p"${PW}" ssh -o StrictHostKeyChecking=no -o LogLevel=quiet $ID@${1_Avamar} -p22 "mccli server show-prop" | egrep -i "Total capacity|capacity used|Last checkpoint"
        sshpass -p"${PW}" ssh -o StrictHostKeyChecking=no -o LogLevel=quiet $ID@${1_Avamar} -p22 "cplist"
        sshpass -p"${PW}" ssh -o StrictHostKeyChecking=no -o LogLevel=quiet $ID@${1_Avamar} -p22 "mccli activity show"

        echo "==========================================================================="
        echo "=============================2 Avamar Check================================"
        echo "==========================================================================="
        sshpass -p"${PW}" ssh -o StrictHostKeyChecking=no -o LogLevel=quiet $ID@${2_Avamar} -p22 "mccli server show-prop" | egrep -i "Total capacity|capacity used|Last checkpoint"
        sshpass -p"${PW}" ssh -o StrictHostKeyChecking=no -o LogLevel=quiet $ID@${2_Avamar} -p22 "cplist"
        sshpass -p"${PW}" ssh -o StrictHostKeyChecking=no -o LogLevel=quiet $ID@${2_Avamar} -p22 "mccli activity show"

        echo "==========================================================================="
        echo "=============================3 Avamar Check================================"
        echo "==========================================================================="
        sshpass -p"${PW}" ssh -o StrictHostKeyChecking=no -o LogLevel=quiet $ID@${3_Avamar} -p22 "cplist"
        sshpass -p"${PW}" ssh -o StrictHostKeyChecking=no -o LogLevel=quiet $ID@${3_Avamar} -p22 "mccli server show-prop" | egrep -i "Total capacity|capacity used|Last checkpoint"
        sshpass -p"${PW}" ssh -o StrictHostKeyChecking=no -o LogLevel=quiet $ID@${3_Avamar} -p22 "mccli activity show"

        echo "==========================================================================="
        echo "==============================4 Avamar Check==============================="
        echo "==========================================================================="
        sshpass -p"${PW}" ssh -o StrictHostKeyChecking=no -o LogLevel=quiet $ID@${4_Avamar} -p22 "mccli server show-prop" | egrep -i "Total capacity|capacity used|Last checkpoint"
        sshpass -p"${PW}" ssh -o StrictHostKeyChecking=no -o LogLevel=quiet $ID@${4_Avamar} -p22 "cplist"
        sshpass -p"${PW}" ssh -o StrictHostKeyChecking=no -o LogLevel=quiet $ID@${4_Avamar} -p22 "mccli activity show"

        echo "==========================================================================="
        echo "==============================5 Avamar Check==============================="
        echo "==========================================================================="
        sshpass -p"${PW}" ssh -o StrictHostKeyChecking=no -o LogLevel=quiet $ID@${5_Avamar} -p22 "mccli server show-prop" | egrep -i "Total capacity|capacity used|Last checkpoint"
        sshpass -p"${PW}" ssh -o StrictHostKeyChecking=no -o LogLevel=quiet $ID@${5_Avamar} -p22 "cplist"
        sshpass -p"${PW}" ssh -o StrictHostKeyChecking=no -o LogLevel=quiet $ID@${5_Avamar} -p22 "mccli activity show"

echo " "
echo "  Avamar Backup Check completed!  "

 

반응형