需求:每天保存交换机配置到FTP
import time
import comware
time_str = time.strftime('%Y-%m-%d-%H-%M-%S')
cli = 'copy startup.cfg ftp://cbyy:xxk123456@192.168.0.177/newzone/infect_nw/CBYXY-GRK-HJ-NW_' + time_str + '.cfg'
c = comware.CLI(cli)
c.get_output()
ftp://FTP
ntp-service enable
clock protocol ntp
ntp-service unicast-server 服务器IP
clock timezone Beijing add 08:00:00
scheduler job beifen
command 1 save force
command 2 python beifen.py
#
scheduler schedule beifen
user-role network-admin
job beifen
time repeating at 02:00 //每天凌晨两点执行
archive configuration server ftp
archive configuration server user
archive configuration server password
不香吗?
(0)
✖
案例意见反馈
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作