cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Announcements
Community

Cisco announces new innovations in SD-WAN, ISRs, SD-WAN Services, and Catalyst 9000 Series switches


2221
Views
0
Helpful
9
Replies
Beginner

TFTP with timestamp

Hi

 

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

 

Hugo

9 REPLIES
Hall of Fame Guru

archive

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.

Beginner

How to change the timestamp

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

Hall of Fame Guru

config t

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

Try that.

Beginner

same , fail

same , fail

Hall of Fame Guru

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.

Beginner

i cannot find backup config

i cannot find backup config in tftp server as well

Hall of Fame Guru

i cannot find backup config

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.

Advocate

Hi, Have a look at this link

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

@sunriderhkAnother way to get

@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

 

CreatePlease to create content
Content for Community-Ad