Created
March 7, 2024 22:03
-
-
Save f5-rahm/f2505811a49c86d6896ce1a35052421e to your computer and use it in GitHub Desktop.
listing backups for BIG-IP Next instances on Central Manager
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Get volume name | |
volname=$(kubectl get pvc mbiq-local-storage-pv-claim -o yaml | grep "volumeName:" | awk '{print $2}') | |
if [[ -z "$volname" ]]; then | |
echo "volumeName could not be found." | |
exit 1 | |
fi | |
# Get path name | |
pathname=$(kubectl get pv "$volname" -o yaml | grep "path:" | awk '{print $2}') | |
if [[ -z "$pathname" ]]; then | |
echo "Path could not be found." | |
exit 1 | |
fi | |
# Display path and list backup files | |
echo "" | |
echo "Backup path: $pathname/backup" | |
echo "" | |
sudo ls -als "$pathname/backup" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
LJAF33M7G