RouterConfig backup behavior

General discussion about Plugins for Cacti

Moderators: Developers, Moderators

Post Reply
jko5
Posts: 10
Joined: Fri Oct 11, 2013 9:35 am

RouterConfig backup behavior

Post by jko5 »

For Windows Server 2012 R2 running Cacti 0.8.8c: Routerconfig plugin for noobs like me.

Like others, I have experienced issues regarding automatic backups. I read through the other postings and a few of them helped me to get this far. (I will post all of my steps below). I altered the "router-download.php' file code and changed 1 value. Now my two test switches backup daily, but the timing is strange.

First day switch one backed up at 11:00
First day switch two backed up at 13:00
Second day switch one backed up at 13:00
Second day switch two backed up at 15:00
Third day switch one backed up at 15:00
I am assuming switch two will back up at 17:00. ( I will keep everyone posted)
See attachment cacti_time_1.
cacti_time_1.PNG
cacti_time_1.PNG (12.07 KiB) Viewed 1632 times
1. Can anyone explain why this is happening?
2. Someone who knows php, is there a snippet of code that I can hard code the time to backup everyday at x? If so, what is it, as I am not a coder and in addition what code can I safely remove to insert that new code?

Here are the steps I took to get devices to backup everyday(if your experiencing issues like I was):

This assumes you have been able to manually backup the devices.

1. If any devices are created for backup, delete them.
2. From cacti server, open the MySQL 5.6 Command Line Client.
a. mysql> use cacti
b. mysql> select * from settings;
c. mysql> select value from settings where name='plugin_routerconfigs_running';
Value will return either a 0 or 1. If value is 1 move to item d: If value is 0 move to item 3.
d. mysql> update settings set value=0 where name='plugin_routerconfigs_running';
e. mysql> select value from settings where name='plugin_routerconfigs_running';
Value will return 0.
3. From cacti server browse to routerconfig plugins directory e.g C:\Apache24\htdocs\cacti\plugins\routerconfigs
a. Edit router-download.php ( I used notepad++)
b. Approx. Line 45 should state db_execute("REPLACE INTO settings (name, value) VALUES ('plugin_routerconfigs_running', 1)");
c. Change the number 1 at the end of the line to 0.
d. It will look like: db_execute("REPLACE INTO settings (name, value) VALUES ('plugin_routerconfigs_running', 0)");
e. Save config
4. Add device to be backed up.
a. Enable Device
b. Use hostname of device for description.
c. IP Address
d. Schedule Daily
e. Use Auto-Detect
f. Add authenication account
5. Do NOT be tempted to run manual backup!!!!!!!!!!!! Let the device sit. It will poll on the half hour or hour (not sure which one).
6. Configure email notification under settings----->Misc.

I hope this helps anyone who is/was having issues. If you have any idea why my change is causing the strange times, please advise.

Thank you,

jko5
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests