Showing posts with label archive. Show all posts
Showing posts with label archive. Show all posts

Saturday, February 25, 2012

kron and backup

Today, I have looked my auto archive to see if they work properly. Surprise, all was ok except for the 3560 switch. When someone execute a 'write memory' all work fine but the schedule backup creates an empty file. There are just these four rows:

!
!
!
end


After some investigations on Internet I have discovered that I was not the first to occur this issue with these equipement. So I have decided to use another solution. It's the kron which is the equivalent of the cron on an unix machine. The configuration looks like this example:


archive
path ftp://10.10.10.10/PATH/MY-SWITCH/$h-
write-memory
no time-period 10080

kron occurrence backup at 22:00 25 recurring
policy-list backup
!
kron policy-list backup
cli archive config

I have kept all the configuration of the archive except the 'time-period'. I have just added policy backup which is schedule by a kron. The policy executes the command 'archive config' and the kron starts one time par month every 25th at 10pm. Also, it's very important to have NTP server if you don't want encountered problem to execute a kron.

Monday, June 6, 2011

Gestion de l'archive sur catalyst

La gestion des archives par l'IOS fournie différents mécanismes de gestion des configs et des logs.
L'exemple ci-dessous permet de sauvegarder la configuration toutes les 24heures sur une carte flash externe:

archive
path disk0:/hostname_
maximum 14
time-period 1440


Validation:

dir disk0:/
5 -rw- 68004 Jun 6 2011 10:11:58 +02:00 hostname_Jun--6-10-11-49.310-CET-0



L'exemple ci-dessous permet de sauvegarder la configuration toutes les 24heures sur un serveur ftp distant:

ip ftp username cisco
ip ftp password cisco
archive
path ftp://10.10.10.10/hostname_
write-memory


L'exemple ci-dessous permet de suivre les différents changements appliqués à la configuration:

archive
log config
logging enable
hidekeys


Validation:

show archive log config all
idx sess user@line Logged command
670 63 admin@vty1 | interface GigabitEthernet1/1/44
671 63 admin@vty1 | no channel-group 430 mode active