Forum Discussion

Emon_423837's avatar
Emon_423837
Icon for Altocumulus rankAltocumulus
Mar 05, 2025

BIG-IP Auto backup configure and send SCP/SFTP using crontab

Prerequisite:

  1. Secure Copy Protocol server (SCP) server.
  2. BIG-IP CLI Access- recommened root user.
Configuration Steps:

Step#1: Login BIG-IP cli and generate ssh key pair.

#ssh-keygen

Nothing to do.. Press Enter again and again.

Step#2: Push the id_rsa.pub key to remote scp server. So that without password we can login. ssh-copy-id scp_user@<remote-scp-ip>

#ssh-copy-id -i /root/.ssh/id_rsa.pub scpnet@10.1.1.10

Now you can check ssh public key authentication working by tring ssh login. ssh scpnet@10.1.1.10

Now test that public key authentication working. Simply do ssh on scp server: ssh scp_user@scp_ip

If it's login remote scp server without password now good to go next step. 

Step#3: Make directory where the backup will stored.

mkdir /var/ucs

Step#4: Set schedule through crontab.

crontab -e

Step#5: After open cron file click i for insert and paste backup taking command.

0 1 * * * tmsh save /sys ucs /var/ucs/$(/bin/hostname).ucs && scp /var/ucs/$(/bin/hostname).ucs scp_user@<scp_server_ip>:/home/scpnet/F5/DC_F5_Node_02/$(/bin/hostname)-$(date +\%Y-\%m-\%d).ucs

  1. For save click ESC
  2. :wq

Step#6: Now verfiy the crontab by

crontab -l

 

Note: This is the simplified 😊 version of below two article. I am tried to simplify and straightforward guide.

 

No RepliesBe the first to reply