mysql> update settings set value=0 where name='plugin_routerconfigs_running';
ERROR 1046 (3D000): No database selected
PLEASE HELP!
routerconfigs automatic backup not running?
Moderators: Developers, Moderators
Re: routerconfigs automatic backup not running?
If you are running mysql queries via the command line, you need to tell it what database to use
http://bit.ly/1iqM0X7
http://bit.ly/1iqM0X7
-
- Posts: 2
- Joined: Wed Dec 23, 2015 11:58 am
Re: routerconfigs automatic backup not running?
kmtasc wrote:Based on grady's analysis, I think the problem maybe in /var/www/html/plugins/routerconfigs/router-download.php
Information of my cacti system:
Cacti Version 0.8.8a
Routerconfigs 0.3
I modified router-download.php
Code: Select all
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); [root@localhost routerconfigs]#
It works well in my test system.Code: Select all
mysql> update settings set value=0 where name='plugin_routerconfigs_running';
Can you please post the complete router-download.php?
Who is online
Users browsing this forum: No registered users and 0 guests