Routerconfigs Hostname and Directory name cannot be the same

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
mikecarel
Cacti User
Posts: 68
Joined: Thu Jun 03, 2010 10:00 pm

Routerconfigs Hostname and Directory name cannot be the same

Post by mikecarel »

Hi,

for easy maintenance of the backup files I used to set the Directory name similar to its Hostname. Doing this will cause the tftp transfer fails on its second time backup run and succeeding backups, as the tftp server will detect that as overwritting the directory or file exist. Changing the following under functions.php will resolve the problem:

function plugin_routerconfigs_download_config(
.....
$date = date("Y-m-d-Hi");
//$tftpfilename = $device['hostname'];
$tftpfilename = $device['hostname'].'-'.$date; //to support Hostname as a Directory name
$filename = $tftpfilename;
......
}

thanks,

Mike
Post Reply

Who is online

Users browsing this forum: No registered users and 25 guests