public static function dumpdb()
 {
     Yii::import('ext.dumpDB.dumpDB');
     $dumper = new dumpDB();
     $current = $dumper->getTextDump();
     $file = dirname(__FILE__) . '/../data/backupdb.mysql';
     file_put_contents($file, $current);
     return;
 }
 public function actionDumbDb()
 {
     Yii::import('ext.dumpDB');
     $dumper = new dumpDB();
     $bk_file = CHtml::encode(Yii::app()->name) . '-' . date('dmY') . '.sql';
     $fh = fopen($bk_file, 'w') or die("can't open file");
     fwrite($fh, $dumper->getDump(FALSE));
     fclose($fh);
     $this->redirect('index.php');
 }