getDbName(); $backDir = $config->paths->backup."/mongoDump"; SystemController::shellExec("mongodump","-d $dbName -o $backDir"); $backupKeyFile = $config->cbs2->keyFile; $backupServerPort = $config->cbs2->serverPort; $storageDir = $config->paths->storage; SystemController::shellExec('rsync -avx --rsh="ssh -i '.$backupKeyFile.' -p'.$backupServerPort.'" '.$storageDir.' backupClient@cbs.asdynamics.com:/'); // $archive = $config->paths->tmp."/backup.tar.gz"; // if (SFSManager::fileExists($archive)){ // SFSManager::deleteFile($archive); // } // SFSManager::createArchive($config->paths->storage, $archive); // GlobalVariables::get("backupClient")->sendBackup("backup_".date("d-m-Y").".tar.gz",$archive); } } ?>