USC backups

Automating a local UCS archive and sending a copy to a remote system


the string to determine how frequently you want the system to create UCS backup files:
15 4 * * 0 tmsh save /sys ucs /var/ucs/$(/bin/hostname).ucs

he string to determine how frequently you want the system to create UCS backup files, and where, outside the system, you want to copy the file (this syntax indicates that the system will back up the files every Sunday at 4:15):

15 4 * * 0 tmsh save /sys ucs /var/ucs/$(/bin/hostname).ucs && scp /var/ucs/$(/bin/hostname).ucs <remote user name>@<remote system IP address>:/<remote directory>/$(/bin/hostname)-$(date +\%Y-\%m-\%d).ucs



Creating a custom logrotate entry to rotate the UCS files using iControl REST


See the accompanying AskF5 article: https://support.f5.com/csp/article/K1...

You can copy the following syntax that is referred to in this video:

• At 1:03, the syntax to configure the syslog-include property:

curl -sku <user>: <passwd> https:// <management interface>/mgmt/tm/sys/log-rotate -X PATCH -H "Content-type: application/json" -d '{ "syslogInclude": "/var/ucs/*.ucs {\n nocompress\n missingok\n notifempty\n sharedscripts\n postrotate\n endscript\n rotate 2\n }"}' | jq -M .

• At 1:36, the syntax to send the save API call:

curl -sku <username>: <password> -H "Content-Type: application/json" -X POST https:// <target BIG-IP hostname or IP address>/mgmt/tm/sys/config -d '{"command":"save"}' | jq -M .

• At 1:51, the syntax to view the log rotate configuration and confirm that the changes were implemented:

curl -sku <user>: <passwd> https:// <management interface>/mgmt/tm/sys/log-rotate | jq-M .