cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
7813
Views
0
Helpful
9
Replies

TFTP with timestamp

sunriderhk
Level 1
Level 1

Hi

 

We got C2960 switch. May I know how to use kron autobackup by using TFTP with timestamp?

 

Hugo

9 Replies 9

Leo Laohoo
Hall of Fame
Hall of Fame
archive
 log config
  logging enable
  hidekeys
 path tftp://<TFTP IP address>/$h-
 write-memory
 time-period 10080

The command above saves the configuration to the TFTP in two ways: 

1.  When one saves the config; and 

2.  Every 7 days.

 

In the TFTP, the file will be saved with time and date stamp as part of the filename.

How to change the timestamp format, I got error as follow?

 

2960G#sh archive 
The next archive file will be named tftp://192.168.1.1/2960G-Feb-24-10:33:34-cfg-1
 Archive #  Name
   0        
   1       :Error - Bad file number 

 

Timestamp config:

service timestamps debug datetime localtime
service timestamps log datetime localtime

config t
serv time d d s l y
serv time l d s l y
end

Try that.

same , fail

same , fail

Wait ... where are you looking at this?  You should be looking for the file(s) in your TFTP server and not in the switch.

i cannot find backup config in tftp server as well

i cannot find backup config in tftp server as well

Save the config of the switch and see what happens to the prompt. 

 

Check if you have a FW stopping TFTP from going through.

acampbell
VIP Alumni
VIP Alumni

Hi,

 

Have a look at this link

 

http://www.cisco.com/c/en/us/support/docs/ios-nx-os-software/ios-software-releases-122-mainline/46741-backup-config.html

Regards

Alex

Regards, Alex. Please rate useful posts.

Johannes Botha
Level 1
Level 1

@sunriderhk

Another way to get daily backup is to use kron

archive
 path tftp://IP_of_TFTP_SERVER/$h__$t
 write-memory

 

 

kron occurrence daily-config-backup at 0:05 recurring
 policy-list backup-config
!
kron policy-list backup-config
 cli write memory
!

 

Make sure you switch or router time is synced

 

Review Cisco Networking products for a $25 gift card