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

KRON UNABLE TO WRITE TO TFTP SERVER - PERMISSION DENIED

Hello Community,

I have a TFTP server where I manually back up all the configs of my routers and switches to. This process is however becoming tedious as I have other tasks to do as well. I'm currently attempting a scheduler with KRON to relieve me of the daily hustle.

My tftp server IP is 10.160.251.99. There is reachability from this particular test router.

 

The usual routine is 'copy run tftp' then the host IP, then I use the suggested filename. It always works.


On the TFTP server, the default location is R:/RouterBackUp.

##Below is the config I have put in to test the scheduler##

 

kron policy-list backup-device-cfg
cli show run | redirect tftp://10.160.251.99/FAB-KORLEBU-RTR.cfg
kron occurrence backupdaily in 1 recurring
policy backup-device-cfg


I have tried different formats of the URL (see attached) to the TFTP server but to no avail.

 

Please help me with the most functional URL or any other settings I may have missed out.

 

Thanks! 

Anthony.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Leo Laohoo
VIP Community Legend VIP Community Legend
VIP Community Legend

Permission denied means the destination server is not allowing WRITE (create the file).  

Also, keep it simple: 

 

archive
 log config
  logging enable
  hidekeys
 path tftp://<TFTP_IP_ADDRESS>/$h-
 write-memory
 time-period 10080

 

The above "archive" script will send a copy of the config to the designated TFTP server when either one of the two is triggered: 

  1. When someone saves the config
  2. After 7 days (10080 seconds) from the last time the config is saved.

View solution in original post

6 REPLIES 6

Leo Laohoo
VIP Community Legend VIP Community Legend
VIP Community Legend

Permission denied means the destination server is not allowing WRITE (create the file).  

Also, keep it simple: 

 

archive
 log config
  logging enable
  hidekeys
 path tftp://<TFTP_IP_ADDRESS>/$h-
 write-memory
 time-period 10080

 

The above "archive" script will send a copy of the config to the designated TFTP server when either one of the two is triggered: 

  1. When someone saves the config
  2. After 7 days (10080 seconds) from the last time the config is saved.

Thank you so much, Leo, this is much more simple.

This should work for me.

Rgds,

Anthony.

Thank you for sharing the link. I learned some stuff from it.

 

Rgds,

Anthony.

balaji.bandi
VIP Guru VIP Guru
VIP Guru

adding to other suggestions - instead of adding the information to the device, why not set up a script that can take care of backup automatically and also make a nice report all backups done day to day tasks: ( keep the backup date format)

 

https://github.com/AlexMunoz905/Python-Cisco-Backup

 

BB

***** Rate All Helpful Responses *****

How to Ask The Cisco Community for Help

Thank you for this innovative python script.

Would look into it for future implementations.

 

Regards,

Anthony.

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: