I like to use Solarwinds CatTools to back up my network gear. It’s a great tool that allows you to easily schedule automated backups of network devices–or any command-line device for that matter.
This is where this post come in. There is no inherent template for backing up an F5 device using CatTools (at least right now).
I have a template that I’ve used over the years to create a UCS file based on the hostname and date, store a local copy in the event I need to restore it, as well as TFTP the file to the built-in TFTP server in CatTools for a remote backup.
First you’ll need a copy of CatTools somewhere that can reach your F5 via. SSH and have the ability to TFTP from the F5 to the CatTools server. I won’t go over the install or making sure your ACL’s allow this, but make sure you do this first.
- Open CatTools Manager
- Add your F5 devices under the Devices tab by clicking Add
- Select F5 as the vendor and F5.BigIP as the device type (although I don’t think this ultimately matters for much other than reporting).
- Pick a name and type in a Host Address (IP address of the F5 management or self IP with ssh permitted inbound)
- Pick SSH2 as your method.
- Click the Passwords tab, and add a user allocated just to CatTools. It will need to be an administrator with advanced shell.
Now you have your device(s) ready for backup. I like to make sure I have L3/4 connectivity by testing the Telnet/SSH button to make sure a prompt comes up. If not, work on your routing/ACL’s.
- Click the Add button under the Activities tab
- Under Activity, pick Device.CLI.Send commands option
- Add a description that makes sense to you.
- Click the Time tab, and set your schedule however you’d like.
- Under Devices, pick the F5(s) you added in the first steps.
Under the Options tab is where the commands will be entered on the device. The script has several lines which I’ll describe below.
This sets an environment variable to the current date, year, month and day for file naming. Change this depending on your location or needs.
Now we set the filename to the hostname of the F5 and the date we just defined, followed by ucs.
tmsh save /sys ucs /var/local/ucs/$filename
Now we execute the tmsh command to create and save the UCS file to the directory we want.
NOTE: Depending on how frequently you set the backup, you could fill up your F5’s local storage. Although this would take a long time, you can create a script to auto-delete the files if you want, or delete them every 6 months or so when you are in the UI.
cd /var/local/ucs tftp -m binary 192.168.1.10 -c put $filename
Now we move to that directory, and TFTP the file to the Cattools server. Change the 192 address to your Cattools server.
This is what it will look like in the UI:
Click OK and run the activity. If you did everything right there should be UCS files in your TFTP directory in CatTools. If not, check ACL’s or routing to make sure you aren’t missing anything.