2024年4月2日发(作者:)
F5系统配置备份及恢复
F5的设备配置可以保存为一个后缀为.ucs的文件,以便今后必要时进行系统恢
复。该系统配置ucs文件是一个二进制文件,并不能阅读,如果用户只是想了
解F5的配置内容,可以通过阅读/config目录下的bigip_和
两个文件。其中,bigip_保存的是有关系统的网络配置(二/三层配
置),而保存的是有关系统的业务配置内容(四/七层配置)。因
此,为方便今后的维护,可以要求管理员同时备份当前配置的ucs文件和
bigip_、文件。具体操作步骤如下:
一、
系统配置的备份 (仅以big01举例, ip 为172.168.10.252)
1. 命令行方式(推荐)
首先采用SSH通过网络连接BIG-IP和配置终端(管理员工作站需安装
FTP服务器),假设管理员的工作站的ip地址为172.168.10.99。推荐在执行本
任务时采用BIG-IP的self-ip 172.168.10.252而非share-ip 172.168.10.254进行连
接,以避免连接到另一台BIG-IP上。具体操作如下:
红色为管理员输入命令,黑色为系统显示内容
big01:~#
big01:~# b config save big01_
Saving
Creating UCS for config
big01:~# cd /usr/local/ucs
big01:/usr/local/ucs# ls
big01_
cs_.1
cs_
last_
big01:/usr/local/ucs#
Trying 172.168.10.
Connected to 172.168.10.99.
220 raymond Microsoft (Version 5.0).
Name (172.168.10.99:root): ftp
331 Anonymous access allowed, send identity (e-mail
name) as password.
Password:
230 Anonymous user logged in.
Remote system type is Windows_NT.
ftp> bin
200 Type set to I.
ftp> hash
Hash mark printing on (1024 bytes/hash mark).
ftp> put big01_
采用FTP连接到管理员的工作站(本
例为172.168.10.99)
采用二进制传输文件(BIN格式)
显示传输进程 (hash 为on)
确认连接到的是big01这台BIG-IP设
备
备份当前配置到big01_这个文件
中(文件名由管理员确定)
文件名推荐采用机器名_日期.ucs的形
式
所有系统配置备份的ucs文件均保存
在/usr/local/ucs目录下
请再次确认上一步骤的确产生了
big01_这个文件
1 / 3
F5系统配置备份及恢复
local: big01_ remote: big01_
227 Entering Passive Mode (172,168,10,99,4,53).
125 Data connection already open; Transfer starting.
##############################################
226 Transfer complete.
274511 bytes sent in 0.0194 seconds (14139118 bytes/s)
ftp> lcd /config
Local directory now /config
ftp> put
ftp> put bigip_
ftp> bye
221
big01:/usr/local/ucs#
传送系统配置ucs文件到管理员工作
站
(前提是以进入本地的/usr/local/ucs
目录,否则的话请先用lcd
/usr/local/ucs切换到该目录再传送)
从/usr/local/ucs目录切换到/config目
录
备份文件
备份bigip_文件
退出ftp进程
二、系统配置的恢复 (仅以big01举例, ip 为172.168.10.252
1. 命令行方式(推荐)
同上,管理员工作站采用网络连接到BIG-IP上,同时管理员工作站必须配置有
FTP服务器。具体操作如下:
红色为管理员输入命令,黑色为系统显示内容
big01:~# 确认连接到的是big01这台
BIG-IP设备
big01:~# cd /var
big01:/var# cd /tmp
big01:/var/tmp#
big01:/var/tmp#
Trying 172.168.10.
Connected to 172.168.10.99.
220 raymond Microsoft (Version 5.0).
Name (172.168.10.99:root): ftp
331 Anonymous access allowed, send identity (e-mail name) as
password.
Password:
230 Anonymous user logged in.
Remote system type is Windows_NT.
ftp> ls
227 Entering Passive Mode (172,168,10,99,4,55).
125 Data connection already open; Transfer starting.
02-19-04 10:24AM 274511 big01_
02-19-04 10:27AM 274482 big01_
226 Transfer complete.
进入/var/tmp目录以避免直接
传送ucs文件到/usr/local/ucs
目录覆盖本地的系统ucs文件
使用FTP连接管理员工作站
查看目录并确认存在备份系统
配置ucs文件big01_
2 / 3
F5系统配置备份及恢复
ftp> bin
200 Type set to I.
ftp> hash
Hash mark printing on (1024 bytes/hash mark).
ftp> get big01_
local: big01_ remote: big01_
227 Entering Passive Mode (172,168,10,99,4,56).
125 Data connection already open; Transfer starting.
226 Transfer complete.
274511 bytes received in 0.058 seconds (4734744 bytes/s)
ftp> bye
big01:/var/tmp# ls
big01_
r/
big01:/tmp# b config install big01_
Installing full configuration on host
Saving
Creating UCS for config
Passwords restored.
Loaded base configuration from /config/bigip_.
Loading base monitors from /etc/base_.
Loading the default classes from /etc/default_.
Loaded main configuration from /config/.
确认已取到系统配置ucs文件
使用big01_恢复系统配置
注意 管理员口令也同时恢复
切记 !!!!
采用二进制传输文件(BIN格
式)
显示传输进程 (hash 为on)
从管理员工作站传送系统配置
ucs文件
######################################################
3 / 3


发布评论