Router Configs backup how many time for week?
Moderators: Developers, Moderators
Router Configs backup how many time for week?
Hello,
I have installed the RouterConfigs, but I force a back 11th of the last week... now I've checked and still have the same backup, the RouterConfigs dont made none backup automaticly.
What I need to configure to run the backups 1 time for day? Like all days at 00 hours?
If is a crontab configuration, what is the command line to backup all actives devices?
Thanks,
Anderson.
I have installed the RouterConfigs, but I force a back 11th of the last week... now I've checked and still have the same backup, the RouterConfigs dont made none backup automaticly.
What I need to configure to run the backups 1 time for day? Like all days at 00 hours?
If is a crontab configuration, what is the command line to backup all actives devices?
Thanks,
Anderson.
-
- Posts: 3
- Joined: Fri Jun 10, 2011 5:40 am
Re: Router Configs backup how many time for week?
Has anyone managed to run routerconfigs plugin automatically?
I am stuck on this problem and I havent seen any answer... When I force a backup manually, I get the plugin running properly, but never automatically. Should I configure something manually in the cron? (like php /cacti/plugins/routerconfigs/router-download.php ???)
Thanks in advance!
I am stuck on this problem and I havent seen any answer... When I force a backup manually, I get the plugin running properly, but never automatically. Should I configure something manually in the cron? (like php /cacti/plugins/routerconfigs/router-download.php ???)
Thanks in advance!
Re: Router Configs backup how many time for week?
Anyone ever figured out that? No automatic backups.
It would be nice if I could run the backuping script automatically, either a) on scheduled time, say nightly; or b) each time a configuration change is detected.
Thanks!
It would be nice if I could run the backuping script automatically, either a) on scheduled time, say nightly; or b) each time a configuration change is detected.
Thanks!
Re: Router Configs backup how many time for week?
Thanks, this solved the problem. However, it still seems that it's something wrong with the plugin itself. It doesn't make any entries in log file; neither cacti.log nor syslog. (I checked both but I use cacti.log).
Re: Router Configs backup how many time for week?
It seems the recording status during scheduled backup is dependent on Cacti's logging level.
See 'Settings -> Poller Logging Level'.
See 'Settings -> Poller Logging Level'.
Re: Router Configs backup how many time for week?
My logging level is set to LOW - Statistics and Errors. I dunno why but I still expected it to save at least a few information lines about the plugin.
However, it seems that running the update command mentioned in another thread corrects the problem only once:
After RouterConfigs makes one backup cycle the plugin_routerconfigs_running value stays at '1' and I need to manuallu update the MySQL again. Any ideas about how to set the value back to 0 after backups were made so it will make the 2nd, 3rd, ... Nth backup again?
Thanks!
However, it seems that running the update command mentioned in another thread corrects the problem only once:
Code: Select all
UPDATE `settings` SET `value` = 0 WHERE `name` = 'plugin_routerconfigs_running';
Thanks!
Re: Router Configs backup how many time for week?
Does anyone found solution for problem of not running automatically jet?
Re: Router Configs backup how many time for week?
We too are experiencing a problem with the automatic backups. The plugin_routerconfigs_running keeps getting set to 1 and once that gets stuck, no more backups will occur. I found the bug and fix at http://209.189.228.151/bugs/print_bug_p ... bug_id=137 - I implemented the change and have to wait until tomorrow to see if it fixes the issue.
I found the original post on the guy's blog at http://abdulet.net/?p=140. I had to translate it to English to figure out what it was talking about - but it makes sense and I'm hoping this resolves the issue once and for all.
I found the original post on the guy's blog at http://abdulet.net/?p=140. I had to translate it to English to figure out what it was talking about - but it makes sense and I'm hoping this resolves the issue once and for all.
Cacti Version - 1.2.6
Poller Type - SPINE 1.2.6
Server Info - CentOS7
Database - MariaDB 10.3.17
Web Server - Apache 2.4.6
SNMP - NET-SNMP 5.7.2
RRDTool - Version 1.4.8
PHP - 7.3.9
Poller Type - SPINE 1.2.6
Server Info - CentOS7
Database - MariaDB 10.3.17
Web Server - Apache 2.4.6
SNMP - NET-SNMP 5.7.2
RRDTool - Version 1.4.8
PHP - 7.3.9
Re: Router Configs backup how many time for week?
The file in question is the router-download.php, in a return line 66 found himself inside a else as well
If (! Empty ($devices)) {
.
.
.
} else {
Return;
}
To solve the problem the else should be the other way
} else {
DB _ execute ("replace into settings (name, value) values ('plugin _ routerconfigs _ running', 0));
Return;
}
If (! Empty ($devices)) {
.
.
.
} else {
Return;
}
To solve the problem the else should be the other way
} else {
DB _ execute ("replace into settings (name, value) values ('plugin _ routerconfigs _ running', 0));
Return;
}
Re: Router Configs backup how many time for week?
1、 modified router-download.php
Code:
root@localhost routerconfigs]# diff -u router-download.php router-download.php.old
--- router-download.php 2012-09-25 14:45:45.000000000 +0800
+++ router-download.php.old 2012-09-24 15:06:59.000000000 +0800
@@ -45,7 +45,7 @@
db_execute("REPLACE INTO settings (name, value) VALUES ('plugin_routerconfigs_running', 1)");
$t = $stime = time();
-$devices = db_fetch_assoc("SELECT * FROM plugin_routerconfigs_devices WHERE enabled = 'on' AND ($t - (schedule * 86400)) + 3600 > lastbackup");
+$devices = db_fetch_assoc("SELECT * FROM plugin_routerconfigs_devices WHERE enabled = 'on' AND ($t - (schedule * 86400)) - 3600 > lastbackup");
$failed = array();
if (!empty($devices)) {
foreach ($devices as $device) {
@@ -62,7 +62,6 @@
sleep(10);
}
} else {
- db_execute("REPLACE INTO settings (name, value) VALUES ('plugin_routerconfigs_running', 0)");
return;
}
$success = count($devices) - count($failed);
2、mysql> use cacti;
mysql> update settings set value=0 where name='plugin_routerconfigs_running';
I have tested,it's ok
Code:
root@localhost routerconfigs]# diff -u router-download.php router-download.php.old
--- router-download.php 2012-09-25 14:45:45.000000000 +0800
+++ router-download.php.old 2012-09-24 15:06:59.000000000 +0800
@@ -45,7 +45,7 @@
db_execute("REPLACE INTO settings (name, value) VALUES ('plugin_routerconfigs_running', 1)");
$t = $stime = time();
-$devices = db_fetch_assoc("SELECT * FROM plugin_routerconfigs_devices WHERE enabled = 'on' AND ($t - (schedule * 86400)) + 3600 > lastbackup");
+$devices = db_fetch_assoc("SELECT * FROM plugin_routerconfigs_devices WHERE enabled = 'on' AND ($t - (schedule * 86400)) - 3600 > lastbackup");
$failed = array();
if (!empty($devices)) {
foreach ($devices as $device) {
@@ -62,7 +62,6 @@
sleep(10);
}
} else {
- db_execute("REPLACE INTO settings (name, value) VALUES ('plugin_routerconfigs_running', 0)");
return;
}
$success = count($devices) - count($failed);
2、mysql> use cacti;
mysql> update settings set value=0 where name='plugin_routerconfigs_running';
I have tested,it's ok
Who is online
Users browsing this forum: No registered users and 2 guests