diff --git a/contrib/index.cnf b/contrib/index.cnf index 82238ab..7bec03f 100644 --- a/contrib/index.cnf +++ b/contrib/index.cnf @@ -1,6 +1,3 @@ -; Ini File to Provision Sccp -; https://github.com/dkgroot/provision_sccp -; [main] debug = on ; The output in the browser window for more information tftproot = /tftpboot diff --git a/install.php b/install.php index 1ccb239..f542c8b 100644 --- a/install.php +++ b/install.php @@ -808,6 +808,10 @@ function CreateBackUpConfig() { $backup_files = array('extconfig','extconfig','res_mysql', 'res_config_mysql','sccp'); $backup_ext = array('_custom.conf', '.conf'); $dir = $cnf_int->get('ASTETCDIR'); + + $filename = $dir.'/sccp_backup_'.date("Ymd").'.sql'; + $result = exec('mysqldump '.$amp_conf['AMPDBNAME'].' --password='.$amp_conf['AMPDBPASS'].' --user='.$amp_conf['AMPDBUSER'].' --single-transaction >'.$filename ,$output); + $zip = new \ZipArchive(); $filename = $dir . "/sccp_instal_backup" . date("Ymd"). ".zip"; if ($zip->open($filename, \ZIPARCHIVE::CREATE)) {