diff --git a/install/sql/incremental/upd_dev_collection.sql b/install/sql/incremental/upd_dev_collection.sql index 5789829a2da17bbe73df58a3c1ea577309e9df0c..caab02181f56f366a2608556bf3e047a02e8aee2 100644 --- a/install/sql/incremental/upd_dev_collection.sql +++ b/install/sql/incremental/upd_dev_collection.sql @@ -104,3 +104,8 @@ ALTER TABLE `client` ALTER TABLE `xmpp_domain` ADD COLUMN `use_webpresence` enum('n','y') NOT NULL DEFAULT 'y', ADD COLUMN `use_http_upload` enum('n','y') NOT NULL DEFAULT 'n'; + + +-- STRIPDOWN! +ALTER TABLE `web_backup` CHANGE `backup_type` `backup_type` enum('web','mysql') NOT NULL DEFAULT 'web'; +ALTER TABLE `web_database_user` DROP COLUMN `database_password_mongo`; \ No newline at end of file diff --git a/install/sql/ispconfig3.sql b/install/sql/ispconfig3.sql index a689cd9bf4102af6924f27ff19c8b498ce13f31d..dd684c7b8e8c259a4d6597b92ddb5caf122d1de4 100644 --- a/install/sql/ispconfig3.sql +++ b/install/sql/ispconfig3.sql @@ -1927,7 +1927,7 @@ CREATE TABLE `web_backup` ( `backup_id` int(10) unsigned NOT NULL AUTO_INCREMENT, `server_id` int(10) unsigned NOT NULL DEFAULT '0', `parent_domain_id` int(10) unsigned NOT NULL DEFAULT '0', - `backup_type` enum('web','mysql','mongodb') NOT NULL DEFAULT 'web', + `backup_type` enum('web','mysql') NOT NULL DEFAULT 'web', `backup_mode` varchar(64) NOT NULL DEFAULT '', `tstamp` int(10) unsigned NOT NULL DEFAULT '0', `filename` varchar(255) NOT NULL DEFAULT '', @@ -1986,7 +1986,6 @@ CREATE TABLE IF NOT EXISTS `web_database_user` ( `database_user` varchar(64) DEFAULT NULL, `database_user_prefix` varchar(50) NOT NULL default '', `database_password` varchar(64) DEFAULT NULL, - `database_password_mongo` varchar(32) DEFAULT NULL, PRIMARY KEY (`database_user_id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; diff --git a/interface/lib/classes/tools_monitor.inc.php b/interface/lib/classes/tools_monitor.inc.php index ce3ffca1eba13e81ab2565eb6665fb0e4da31201..1bb96f1699554c30b28e06b02f8c26dde7d676c4 100644 --- a/interface/lib/classes/tools_monitor.inc.php +++ b/interface/lib/classes/tools_monitor.inc.php @@ -504,39 +504,6 @@ class tools_monitor { return $html; } - function showMongoDB() { - global $app; - - /* fetch the Data from the DB */ - $record = $app->db->queryOneRecord("SELECT data, state FROM monitor_data WHERE type = 'log_mongodb' and server_id = ? ORDER BY created DESC", $_SESSION['monitor']['server_id']); - - if(isset($record['data'])) { - $html = - '
-
'; - - /* - * First, we have to detect, if there is any monitoring-data. - * If not (because mongodb is not installed) show this. - */ - $data = unserialize($record['data']); - if ($data == '') { - $html .= '

'. - 'MongoDB is not installed on this server.
' . - '

'; - } - else { - $html .= nl2br($data); - } - $html .= '
'; - - } else { - $html = '

There is no data available at the moment.

'; - } - - return $html; - } - function showIPTables() { global $app; $record = $app->db->queryOneRecord("SELECT data, state FROM monitor_data WHERE type = 'iptables_rules' and server_id = ? ORDER BY created DESC", $_SESSION['monitor']['server_id']); diff --git a/interface/web/admin/form/server_config.tform.php b/interface/web/admin/form/server_config.tform.php index b2009d96c21bda35e8285c18d20211f8cb675cd7..ceb7626f534563c58e000ce5013cfcaf96349758 100644 --- a/interface/web/admin/form/server_config.tform.php +++ b/interface/web/admin/form/server_config.tform.php @@ -1858,12 +1858,6 @@ $form["tabs"]['rescue'] = array( 'default' => 'n', 'value' => array(0 => 'n', 1 => 'y') ), - 'do_not_try_rescue_mongodb' => array( - 'datatype' => 'VARCHAR', - 'formtype' => 'CHECKBOX', - 'default' => 'n', - 'value' => array(0 => 'n', 1 => 'y') - ), 'do_not_try_rescue_mysql' => array( 'datatype' => 'VARCHAR', 'formtype' => 'CHECKBOX', diff --git a/interface/web/admin/templates/server_config_rescue_edit.htm b/interface/web/admin/templates/server_config_rescue_edit.htm index df8aa97c0714ce4e5ac94a73e978c8a2e71d1f03..855ca877ee2586122c00d508298d33a221eadf49 100644 --- a/interface/web/admin/templates/server_config_rescue_edit.htm +++ b/interface/web/admin/templates/server_config_rescue_edit.htm @@ -17,14 +17,6 @@ {tmpl_var name='do_not_try_rescue_httpd'} -
diff --git a/interface/web/monitor/lib/module.conf.php b/interface/web/monitor/lib/module.conf.php index 5b35053dc6f7dcda21daa7109eb470f64864697f..1f40d7b4d3b31fbbb33c6d01e710de6d722ec76c 100644 --- a/interface/web/monitor/lib/module.conf.php +++ b/interface/web/monitor/lib/module.conf.php @@ -201,12 +201,6 @@ $items[] = array( 'title' => "Show fail2ban-Log", 'link' => 'monitor/show_data.php?type=fail2ban', 'html_id' => 'fai2ban'); -/* -$items[] = array( 'title' => "Show MongoDB-Log", - 'target' => 'content', - 'link' => 'monitor/show_data.php?type=mongodb', - 'html_id' => 'mongodb'); -*/ $items[] = array( 'title' => "Show IPTables", 'target' => 'content', 'link' => 'monitor/show_data.php?type=iptables', diff --git a/interface/web/monitor/show_data.php b/interface/web/monitor/show_data.php index 80f246ee2dcec04b6a255c1c5d9bec58adbd5420..9a5cafea446446b3eb25cdbc549a9aecfbad23cf 100644 --- a/interface/web/monitor/show_data.php +++ b/interface/web/monitor/show_data.php @@ -138,15 +138,6 @@ case 'fail2ban': $description = ''; $add_padding = true; break; -/* -case 'mongodb': - $template = 'templates/show_data.htm'; - $output .= $app->tools_monitor->showMongoDB(); - $time = $app->tools_monitor->getDataTime('log_mongodb'); - $title = $app->lng("monitor_title_mongodb_txt") . ' (' . $monTransSrv . ' : ' . $_SESSION['monitor']['server_name'] . ')'; - $description = ''; - break; -*/ case 'iptables': $template = 'templates/show_data.htm'; $output .= $app->tools_monitor->showIPTables(); diff --git a/interface/web/sites/database_user_edit.php b/interface/web/sites/database_user_edit.php index 07fa1315f062960e5f214aefdaa3eebb19f8837b..6d18893e71d70a60b1789bdacee911ec33c8bf44 100644 --- a/interface/web/sites/database_user_edit.php +++ b/interface/web/sites/database_user_edit.php @@ -168,14 +168,6 @@ class page_action extends tform_actions { $this->dataRecord['database_user'] = substr($dbuser_prefix . $this->dataRecord['database_user'], 0, 16); } - /* prepare password for MongoDB */ - // TODO: this still doens't work as when only the username changes we have no database_password. - // taking the one from oldData doesn't work as it's encrypted...shit! -/* - $this->dataRecord['database_password_mongo'] = $this->dataRecord['database_user'].":mongo:".$this->dataRecord['database_password']; - - $this->dataRecord['server_id'] = 0; // we need this on all servers -*/ parent::onBeforeUpdate(); } @@ -211,9 +203,6 @@ class page_action extends tform_actions { $this->dataRecord['server_id'] = 0; // we need this on all servers - /* prepare password for MongoDB */ -// $this->dataRecord['database_password_mongo'] = $this->dataRecord['database_user'].":mongo:".$this->dataRecord['database_password']; - parent::onBeforeInsert(); } diff --git a/interface/web/sites/form/database.tform.php b/interface/web/sites/form/database.tform.php index 40085478397bd7b0a7ca8733f5f1b4014d5fe853..32d06945019618d9abc64ea8a1a182f83cb7ae53 100644 --- a/interface/web/sites/form/database.tform.php +++ b/interface/web/sites/form/database.tform.php @@ -90,7 +90,6 @@ $form["tabs"]['database'] = array ( 'formtype' => 'SELECT', 'default' => 'mysql', 'value' => array( - /*'mongo' => 'MongoDB',*/ 'mysql' => 'MySQL' ) ), diff --git a/interface/web/sites/form/database_user.tform.php b/interface/web/sites/form/database_user.tform.php index 09d2c32b2c3e94ca714fd8e574bb09df3ebb0563..6fc02dbe19348bdb9fd2f54fa87d8a2b4c43c3fa 100644 --- a/interface/web/sites/form/database_user.tform.php +++ b/interface/web/sites/form/database_user.tform.php @@ -115,15 +115,7 @@ $form["tabs"]['database_user'] = array ( 'value' => '', 'width' => '30', 'maxlength' => '255' - ), - 'database_password_mongo' => array ( - 'datatype' => 'VARCHAR', - 'formtype' => 'PASSWORD', - 'default' => '', - 'value' => '', - 'width' => '30', - 'maxlength' => '255' - ), + ) //################################# // ENDE Datatable fields //################################# diff --git a/interface/web/sites/list/database.list.php b/interface/web/sites/list/database.list.php index 25e1b8de7f3811e6ef3a7bc51a1d459c445b572e..9684b2ac8272241fb420d3a13dd29e7e1992d9f9 100644 --- a/interface/web/sites/list/database.list.php +++ b/interface/web/sites/list/database.list.php @@ -78,7 +78,6 @@ $liste["item"][] = array( 'field' => "type", 'suffix' => "", 'width' => "", 'value' => array( - 'mongo' => "MongoDB", 'mysql' => "MySQL" ) ); diff --git a/server/lib/classes/monitor_tools.inc.php b/server/lib/classes/monitor_tools.inc.php index 04f654ccde7a6deb2548a163cf80ff8c90cf067f..1921851e3dcabf6492c4d9997785096f8b393946 100644 --- a/server/lib/classes/monitor_tools.inc.php +++ b/server/lib/classes/monitor_tools.inc.php @@ -454,16 +454,6 @@ class monitor_tools { $state = 'error'; // because service is down } } -/* - $data['mongodbserver'] = -1; - if ($this->_checkTcp('localhost', 27017)) { - $data['mongodbserver'] = 1; - } else { - $data['mongodbserver'] = 0; -*/ - //$state = 'error'; // because service is down - /* TODO!!! check if this is a mongodbserver at all, otherwise it will always throw an error state!!! */ -// } /* * Return the Result @@ -598,9 +588,6 @@ class monitor_tools { $logfile = '/var/log/fail2ban.log'; } break; - case 'log_mongodb': - $logfile = '/var/log/mongodb/mongodb.log'; - break; case 'log_ispconfig': if ($dist == 'debian') { $logfile = $conf['ispconfig_log_dir'] . '/ispconfig.log'; diff --git a/server/mods-available/rescue_core_module.inc.php b/server/mods-available/rescue_core_module.inc.php index 5e8f3db9ce5aef12d38a956b2668f691ac797e6d..a434a63a62d8b9202554238bf32b2d0aeb77527f 100644 --- a/server/mods-available/rescue_core_module.inc.php +++ b/server/mods-available/rescue_core_module.inc.php @@ -94,11 +94,6 @@ class rescue_core_module { */ $this->_rescueData = $this->_getRescueData(); - /* - * rescue MongoDB if needed - */ -// $this->_rescueMongoDB(); - /* * rescue mysql if needed (maybe httpd depends on mysql, so try this first!) */ @@ -311,73 +306,6 @@ class rescue_core_module { $this->_rescueDaemon($daemon); } - - /** - * restarts MongoDB, if needed - */ -// private function _rescueMongoDB(){ -// global $app, $conf; - - /* - * do nothing, if it is not allowed to rescue mysql - */ -// if ((isset($conf['serverconfig']['rescue']['do_not_try_rescue_mongodb']) && ($conf['serverconfig']['rescue']['do_not_try_rescue_mongodb']) == 'y')){ -// return; -// } - - /* - * if the service is up and running, or the service is not installed there is nothing to do... - */ -// if ($this->_monitoringData[0][0]['data']['mongodbserver'] != 0){ -// /* Clear the try counter, because we do not have to try to rescue the service */ -// $this->_rescueData['mongodbserver']['try_counter'] = 0; -// return; -// } - - /* - * OK, the service is installed and down. - * Maybe this is because of a restart of the service by the admin. - * This means, we check the data 1 minute ago - */ -// if ((!isset($this->_monitoringData[1][0]['data']['mongodbserver'])) || -// ((isset($this->_monitoringData[1][0]['data']['mongodbserver'])) && ($this->_monitoringData[1][0]['data']['mongodbserver'] != 0))){ - /* - * We do NOT have this data or we have this data, but the webserver was not down 1 minute ago. - * This means, it could be, that the admin is restarting the server. - * We wait one more minute... - */ -// return; -// } - - /*##### - * The service is down and it was down 1 minute ago. - * We try to rescue it - *#####*/ - - /* Get the try counter */ -// $tryCount = (!isset($this->_rescueData['mongodbserver']['try_counter']))? 1 : $this->_rescueData['mongodbserver']['try_counter'] + 1; - - /* Set the new try counter */ -// $this->_rescueData['mongodbserver']['try_counter'] = $tryCount; - - /* if 5 times will not work, we have to give up... */ -// if ($tryCount > 5){ -// $app->log('MongoDB is down! Rescue will not help!', LOGLEVEL_ERROR); -// return; -// } - - -// $app->log('MongoDB is down! Try rescue MongoDB (try:' . $tryCount . ')...', LOGLEVEL_WARN); - -// if(is_file($conf['init_scripts'] . '/' . 'mongodb')) { -// $daemon = 'mongodb'; -// } else { -// $daemon = 'mongodb'; -// } - -// $this->_rescueDaemon($daemon); -// } - /** * restarts mysql, if needed */ diff --git a/server/plugins-available/backup_plugin.inc.php b/server/plugins-available/backup_plugin.inc.php index 12f58c1f1b7046c748b36ec52781426c4a2b2adf..cba46b85784606e4e3e5ed084f5dff028412cc84 100644 --- a/server/plugins-available/backup_plugin.inc.php +++ b/server/plugins-available/backup_plugin.inc.php @@ -93,32 +93,6 @@ class backup_plugin { } } - //* Restore a MongoDB backup - if($action_name == 'backup_restore' && $backup['backup_type'] == 'mongodb') { - if(file_exists($backup_dir.'/'.$backup['filename'])) { - //$parts = explode('_',$backup['filename']); - //$db_name = $parts[1]; - preg_match('@^db_(.+)_\d{4}-\d{2}-\d{2}_\d{2}-\d{2}\.tar\.gz$@', $backup['filename'], $matches); - $db_name = $matches[1]; - - // extract tar.gz archive - $dump_directory = str_replace(".tar.gz", "", $backup['filename']); - $extracted = "/usr/local/ispconfig/server/temp"; - exec("tar -xzvf ".escapeshellarg($backup_dir.'/'.$backup['filename'])." --directory=".escapeshellarg($extracted)); - $restore_directory = $extracted."/".$dump_directory."/".$db_name; - - // mongorestore -h 127.0.0.1 -u root -p 123456 --authenticationDatabase admin -d c1debug --drop ./toRestore - $command = "mongorestore -h 127.0.0.1 --port 27017 -u root -p 123456 --authenticationDatabase admin -d ".$db_name." --drop ".escapeshellarg($restore_directory); - exec($command); - exec("rm -rf ".escapeshellarg($extracted."/".$dump_directory)); - } - - unset($clientdb_host); - unset($clientdb_user); - unset($clientdb_password); - $app->log('Restored MongoDB backup '.$backup_dir.'/'.$backup['filename'], LOGLEVEL_DEBUG); - } - //* Restore a mysql backup if($action_name == 'backup_restore' && $backup['backup_type'] == 'mysql') { //* Load sql dump into db