List BIG-IP Next Instance Backups on Central Manager

In the Central Manager GUI, you can create/schedule BIG-IP Next Instance backups, but outside of the listing shown there, you can't download the files from that view if you want to archive them for off-box requirements. Finding them in the Central Manager command line to download them via secure copy (scp) requires some kubernetes-fu knowhow, mainly, interrogating the persistent volume claims and persistent volumes:

  • kubectl get pvc mbiq-local-storage-pv-claim -o yaml | grep volumeName
  • kubectl get pv <volumename result> -o yaml | grep "path: "

This script takes the guesswork out of all that and let's you focus on more important things. Example output:

admin@cm1:~$ ./lbu.sh

Backup path: /var/lib/rancher/k3s/storage/pvc-ae75faee-101e-49eb-89f7-b66542da1281_default_mbiq-local-storage-pv-claim/backup

total 3860
   4 drwxrwxrwx 2 root   root    4096 Mar  7 19:33 .
   4 drwxrwxrwx 7 root   root    4096 Feb  2 00:01 ..
1780 -rw-r--r-- 1 ubuntu lxd  1821728 Feb 28 18:40 3b9ef4d8-0f0b-453d-b350-c8720a30db16.2024-02-28.18-39-59.backup.tar.gz
 288 -rw-r--r-- 1 ubuntu lxd   292464 Feb 28 18:39 7bf4e3ac-e8a2-44a3-bead-08be6c590071.2024-02-28.18-39-15.backup.tar.gz
1784 -rw-r--r-- 1 ubuntu lxd  1825088 Mar  7 19:33 7bf4e3ac-e8a2-44a3-bead-08be6c590071.2024-03-07.19-32-56.backup.tar.gz

 

Script Source

Updated Mar 08, 2024
Version 2.0
No CommentsBe the first to comment