08-17-2007 12:01 AM - edited 02-21-2020 01:38 AM
How i can do Automatic backup configuration on ASA/PIX
like: "archive" on IOS
Someone has ideas how I can make it on ASA/PIX?
Thanks
08-17-2007 05:36 AM
i wrote perl scripts for it - if you want it posted, lemmie know.
08-17-2007 06:06 AM
Yes, I would like to look it.
Thanxs
08-17-2007 06:34 AM
I am by no means a Perl expert, this is just something i happened to get working. It opens a file at location /path/to/file/pixhosts.db, to get IP's (which i configured a web interface to add/remove hosts for). the format for that is simply one IP address per line. you must first configure each pix/asa with the tftp-server command, and make sure your tftp server is configured properly. then, run the script as a cron job. the script performs a 'write mem and write net'. i wrote a similar script for IOS.
===================
use Net::Telnet::Cisco;
$passwd = 'telnet_passwd';
$enable_passwd = 'enable_password';
open (HOSTS, "/path/to/file/pixhosts.db");
@hosts =
chomp (@hosts);
foreach $pix (@hosts)
{
my $session = Net::Telnet::Cisco->new(Host => $pix, Timeout => 30);
$session->prompt('/[\$%#>] $/');
$session->login('username', $passwd);
$session->enable($enable_passwd);
$session->cmd("write mem\nwrite net\n");
}
close (HOSTS);
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide