Here I will show you what I came up with to backup a Cambium EPMP Access Point using a custom bash script that I created. I’m not scripting genius by any means and I call this dirty for a reason. But it does work. This is hosted on a linux server.

#!/bin/bash

#Script to Backup Cambium EPMP APs

file="/backups/EPMP/epmpaddresslist.txt"
OID1="1.3.6.1.4.1.17713.21.1.1.13.0"
OID2="1.3.6.1.4.1.17713.21.6.4.30.0"
OID3="1.3.6.1.4.1.17713.21.6.4.33.0"
DIR="/backups/EPMP/Backups/Backup_$(date +"%m-%d-%Y")"
cat "$file" | while read -r line; do

NAME=$(snmpget -On -v2c -c 'communitystring' "$line" "$OID1" -Ov  | tr -d '"' | sed 's/STRING://g' | sed "s/^[[:space:]]*//")
eval NAME=($NAME)
echo $NAME

sleep 2

snmpset -On -v2c -c 'communitystring' "$line" "$OID2" i 001

sleep 8

snmpget -On -v2c -c 'communitystring' "$line" "$OID3" -Ov | tr -d '"' | sed s/STRING://g | sed s/^[[:space:]]*// > /backups/EPMP/downloadlinks.txt

sleep 3

mkdir -p $DIR

cat /backups/EPMP/downloadlinks.txt | xargs -n1 curl >  /$DIR/"$NAME"-$(date +"%m-%d-%Y").bin

done
exit

So what this script does is call the AP via SNMP OIDs. The variables in the script include an address list and the required OIDs to facilitate everything. The address list is where you put all your IP addresses of your devices in line for line. OID1 is to get the device name. OID2, tells it to create the backup BIN file. OID3 is the BIN file download link provided by the AP. On that SNMPGET with OID3 to pushes that link to a file I just called downloadlinks.txt. The last command reads that link, invokes curl to download the backup BIN file directly from the EPMP Access Point. Don’t forget to put all these files in the same directory. You’ll need the address list file, download links files, and the actually bash script. Go ahead a create a backup folder within that folder containing all the above mentioned files. Replace “communitystring” in the script with your SNMP community string.

This script creates a directory named the current date. Then backs up every device listed in the address list with the time/date stamp appended to the file name. Add this script to a CRON job and now your EPMP access points are automatically backed up at your convenience. Enjoy!

By Tim