NetScreen のコンフィグ自動バックアップ

| No Comments | No TrackBacks

NetScreen のコンフィグの自動バックアップ。

SCS の設定をしてもリモートの Linux ホストから ssh で save config をかけたりは
できないみたい。

$ ssh ns-50 -l netscreen save config from flash to tftp ww.xx.yy.zz ns50.config
Disconnecting: protocol error: rcvd type 15
$ 

ということで、しかたなく expect で対応。

#!/usr/bin/expect

spawn ssh ns-50 -l netscreen

expect "> "
send "save config from flash to tftp ww.xx.yy.zz ns50.config\r"

expect "> "
send "exit\r"

ってな expect スクリプト(手抜き気味ですが)を呼ぶようにする。

$ bin/backup-ns50-config
spawn ssh ns-50 -l netscreen
Remote Management Console

ns50-> save config from flash to tftp ww.xx.yy.zz ns50.config
Read config from flash.
System config (4502 bytes) loaded
Save configurations (4486 bytes) to ns50.config on TFTP server ww.xx.yy.zz.
!!!!!!!!!!!!!!!!!!!!
tftp transferred records = 9
tftp success!

TFTP Succeeded
ns50-> $

ってことで、これを cron にしかける。

Summit みたいにスケジュールできると楽なんだけど。

No TrackBacks

TrackBack URL: http://www.grid5.net/mt/mt-trackback.cgi/518

Leave a comment

About this Entry

This page contains a single entry by dxy published on 2003年10月22日 22:57.

iTunes for Windows was the previous entry in this blog.

スクリーンショット・ソフトウェア is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Pages

Powered by Movable Type 5.01