Forum Discussion
Cyril
Jan 19, 2017Nimbostratus
Help! - SCP Automated Backup file using Password
Hello Gentlemen,
I need to push the automated configuration backup files to a Windows server.
I tried this by copying the pub_key on to the destination server where this didn't work as the destin...
Ryannnnnnnnn
Jan 20, 2017Altocumulus
What about backing up to ftp and using something similar to the following:
!/bin/sh -x
tmsh save /sys ucs /var/tmp/LTM_backup
export a=`date +"%y%m%d"`
export aa=$HOSTNAME.$a.ucs
export b=/var/tmp/$aa
mv /var/tmp/LTM_backup.ucs $b
tar -cf /var/tmp/certs.tar /config/ssl
export ff=$HOSTNAME.$a.certs.tar
export f=/var/tmp/$ff
mv /var/tmp/certs.tar $f
export c=$HOSTNAME.$a.crontab
export cc=/var/tmp/$c
cp /etc/crontab $cc
export MName=1.1.1.1
export Log=/var/tmp/log.bigip
export UserName=SomeUserName
export UserPassword=SomePassWord
export Machine1f2=$aa
export Machine1f3=$c
export Machine1f4=$ff
ftp -nvd ${MName} 14 <<-END 1>&2 > ${Log}
user ${UserName} ${UserPassword}
bin
passive
put ${b} ${Machine1f2}
put ${cc} ${Machine1f3}
put ${f} ${Machine1f4}
quit
END
rm -f ${b}
rm -f ${cc}
rm -f ${f}
RTN_CODE=$?
exit $RTN_CODE
You can then configure a crontab entry and schedule backups for whenever suits you.
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects