This is how I've done it via SFTP and key authentication. You need to first create a dsa key to use for authentication to your SCP/SFTP server. Then put the script in a file named /config/backup and create a chron job using this,
chmod +x /config/backup; ln -s /config/backup /etc/cron.daily/backup
!/bin/bash
Set variables for UCS file name
dt=`date +%Y%m%d`
hostname=`uname -n |cut -d. -f1`
DDIR=/var/tmp
SFTPhost=
Delete old ucs file created by this script
rm $DDIR/$hostname*.ucs
Send syslog message to log servers
logger -p local0.info -t BIGIP configuration backup started.
Commit configuration from memory to files
cd /config
tmsh save /sys config
Create configuraiton archive
tmsh save /sys ucs $DDIR/$hostname-$dt.ucs
Send to admin server via SFTP
cd $DDIR
sftp -oIdentityFile=/config/sftp_dsa $hostname@$SFTPhost<< EOF
cd $hostname
put $hostname-$dt.ucs
quit
EOF
Send syslog message to log servers
logger -p local0.info -t BIGIP configuration backup completed.