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 <span class="token number">3860</span>
   <span class="token number">4</span> drwxrwxrwx <span class="token number">2</span> root   root    <span class="token number">4096</span> Mar  <span class="token number">7</span> <span class="token number">19</span>:33 <span class="token builtin class-name">.</span>
   <span class="token number">4</span> drwxrwxrwx <span class="token number">7</span> root   root    <span class="token number">4096</span> Feb  <span class="token number">2</span> 00:01 <span class="token punctuation">..</span>
<span class="token number">1780</span> -rw-r--r-- <span class="token number">1</span> ubuntu lxd  <span class="token number">1821728</span> Feb <span class="token number">28</span> <span class="token number">18</span>:40 3b9ef4d8-0f0b-453d-b350-c8720a30db16.2024-02-28.18-39-59.backup.tar.gz
 <span class="token number">288</span> -rw-r--r-- <span class="token number">1</span> ubuntu lxd   <span class="token number">292464</span> Feb <span class="token number">28</span> <span class="token number">18</span>:39 7bf4e3ac-e8a2-44a3-bead-08be6c590071.2024-02-28.18-39-15.backup.tar.gz
<span class="token number">1784</span> -rw-r--r-- <span class="token number">1</span> ubuntu lxd  <span class="token number">1825088</span> Mar  <span class="token number">7</span> <span class="token number">19</span>:33 7bf4e3ac-e8a2-44a3-bead-08be6c590071.2024-03-07.19-32-56.backup.tar.gz

Script Source

1 Like