This can cleaner but it's a start.
This make a backup from dhcp reservation every day on 4 AM
If you run this the first time it add automatic to crontab
Before run check directory's!
Copy before run the file to your backup dir , need a check
#!/bin/bash
USBPLACE="/volumeUSB1/usbshare/@sharebin/Webdav/router"
WHATV="$USBPLACE/backup-dhcp.sh"
WHAT="0 4 * * * root /bin/sh $WHATV"
WHATF="/etc/crontab"
TFILE="dhcpdStatic.ori"
P1="/etc/dhcpd/$TFILE"
P2="$USBPLACE/$TFILE.txt"
count=$(grep -c "$WHATV" $WHATF)
if [ "$count" -eq 0 ];then
echo "$WHAT" >> $WHATF
cp -p -f $P2 $P1
fi
cp -p -f $P1 $P2