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

TFTP with timestamp

sunriderhk
Beginner
Beginner

Hi

 

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

 

Hugo

9 Replies 9

Leo Laohoo
VIP Community Legend VIP Community Legend
VIP Community Legend
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

Leo Laohoo
VIP Community Legend VIP Community Legend
VIP Community Legend
config t
serv time d d s l y
serv time l d s l y
end

Try that.

same , fail

Leo Laohoo
VIP Community Legend VIP Community Legend
VIP Community Legend
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

Leo Laohoo
VIP Community Legend VIP Community Legend
VIP Community Legend
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
Advocate
Advocate

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
Beginner
Beginner

@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

 

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: