Skip to content

Instantly share code, notes, and snippets.

@f5-rahm
Created March 7, 2024 22:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save f5-rahm/f2505811a49c86d6896ce1a35052421e to your computer and use it in GitHub Desktop.
Save f5-rahm/f2505811a49c86d6896ce1a35052421e to your computer and use it in GitHub Desktop.
listing backups for BIG-IP Next instances on Central Manager
#!/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"
@Salhadinog
Copy link

LJAF33M7G

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment