Forum Discussion

Wil_Schultz_101's avatar
Wil_Schultz_101
Icon for Nimbostratus rankNimbostratus
Jun 18, 2007

How do you backup your BigIP?

So, this isn't iRule related but I'm wondering what other people do.

We have two BigIP's, an "Active" one and a "Passive" one. So what we do is set up a crontab entry on the primary bigip that config sync's to the secondary every night if it's active, and on the secondary I've created an NFS mount and set up another crontab entry that backs up the entire /config directory onto this export. Also some cleanup includes deleting backups that are a month old.

Incase you are interested, here are the scripts... Also post what you do!

primary bigip, configsync:


!/bin/bash
 Created by WilS to ConfigSync the primary bigip to the secondary bigip
 Added only on the primary bigip
 file: /bin/configsync.sh
 
 Added to /etc/crontab:
 01 1 * * * root /bin/configsync.sh > /dev/null 2>&1
 Variable to make sure we're active
STATE=`/bin/ps1`
 Check to make sure we're primary
if [ $STATE == "Active" ] ; then bigpipe config sync all; fi

secondary bigip, backup after configsync:


!/bin/bash
 
 Created by WilS to backup the secondary bigip to /export/backup
 Added only on the secondary bigip
 file: /bin/backup.config.sh
 Added to /etc/crontab:
 10 1 * * * root /bin/backup.config.sh > /dev/null 2>&1
 Grab the files in /config and tar.date them
cd /
tar zcvf /export/backup/bigip2.`date  +%m%d%Y`.tgz ./config
 Remove all the files that are a month old...
find /export/backup/ -name 'bigip2.*.tgz' -mtime +31 |xargs rm

5 Replies

  • I was not aware of /bin/ps1, that's certainly shorter than:

     

     

    FAILOVER=`bigpipe failover show | cut -d" " -f 2`

     

     

    We also track the sync status so we don't sync unnecessarily:

     

     

    STATUS=`bigpipe config sync show | grep Status | cut -d" " -f 7`

     

     

    For backups, we have Alterpoint, so it archives when a configuration change is made on either system.
  • We have changed syslog-ng to syslog out to an external syslog server, as well as locally still.

     

     

    We use a CVS script to log into each BigIP and grab the relevant files from /config and add them to CVS.
  • wschultz, that looks like a good start. You might want to consider using the 'b config save /path/to/output.file.ucs' command to create a complete archive of the BIG-IP configuration. The UCS archive created by the config save function contains the /config directory contents and much more.

     

     

    I use the following command to include the hostname, version and date in the filename (.ucs is appended by the config save process):

     

     

    b config save /shared/tmp/`hostname`_`b version|grep '^BIG-IP Version'|awk '{print $3}'`_`date +%Y%m%d`

     

     

    You might also consider getting a full UCS archive from both units in the pair as the base network configuration differs between the two units.

     

     

    Aaron
  • I also use the 'b config save' command. I use the resulting .ucs file to recover the bigip at our DR site. It takes about 10 minutes to recover an image using the .ucs
  • We use EM (currently on Beta1.4), archiving can be scheduled and rotated automatically on EM.