intial commit

This commit is contained in:
2025-10-24 16:56:57 +01:00
commit 4117287e95
6 changed files with 673 additions and 0 deletions

32
list_mv.sh Executable file
View File

@@ -0,0 +1,32 @@
#!/bin/bash
#
# List MVs using API call to CDM, for diagnostic purposes
# Written for Avon
# v1.1 - James Pattinson - October 2023
#
# usage: list_mv.sh
MYDIR="$(dirname "$(readlink -f "$0")")"
source $MYDIR/rbk_api.conf
source $MYDIR/oracle_funcs.sh
# Script starts here
echo Service account in use is $ID
echo ALL MVs
ENDPOINT="https://$RUBRIK_IP/api/internal/managed_volume"
rest_api_get
grep -Eo '"name"[^,]*' /tmp/rbkresponse.$$
echo NonRelic MVs
ENDPOINT="https://$RUBRIK_IP/api/internal/managed_volume?is_relic=false"
rest_api_get
grep -Eo '"name"[^,]*' /tmp/rbkresponse.$$
cleanup