#!/bin/bash # # List MVs using API call to CDM, for diagnostic purposes # Written for HCL / Nokia # v1.1 - James Pattinson - October 2025 # # 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