Save config to a file or other server

Save to local disk
# save /var/home/lab/R1.conf
to restore

# load override /var/home/lab/R1.conf

Save to other server
# save root@10.1.12.2:R1.conf
we can run ssh server in windows using scp server
then use splunk to detect if there is a new file in certain directory then send to email
How to use scp to archive configuration to a remote device when executing a commit operation
# set system archival configuration transfer-on-commit
# set system archival configuration archive-sites “scp://user@remote-host-ip:/path/filename” password “password”
After entering the above command, please enter the carriage-return and you will be prompted by the following message to add the public key of the remote host ip. The prompt will appear only if it was first time the remote ip is used for archival on the EX Switch.  Please answer “yes” at the prompt
{master:1}[edit system archival configuration]
# set archive-sites “scp://user@10.85.33.22:/path/filename” password “password”
The authenticity of host ‘10.85.33.22 (10.85.33.22)’ can’t be established.
RSA key fingerprint is 24:60:ab:1b:6d:4e:10:e2:ea:9c:0f:af:17:49:38:cc.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ‘10.85.33.22’ (RSA) to the list of known hosts.
The public key of the remote host (10.85.33.22 in the above example) can be viewed using the command
# show security
ssh-known-hosts {
host 10.85.33.22 {
rsa-key  B3NzaC1yc2EAAAABIwAAAQEA..(truncated)
}
}
Once the key is added, EX archives the configuration, every time the configuration is committed.
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s