public function __construct()
 {
     @ini_set('max_execution_time', 300);
     // Temporarily increase maximum execution time
     parent::__construct();
     $this->current_time = date("Y-m-d-H-i-s");
     $this->backup_file = backup_path() . "/backup_{$this->current_time}.zip";
     $this->restore_file = restore_path() . "/backup_{$this->current_time}.zip";
 }
 public function postBackup()
 {
     $this->current_time = date("Y-m-d-H-i-s");
     $this->backup_dir = backup_path() . "/backup/";
     $this->backup_file = backup_path() . "/backup_{$this->current_time}.zip";
     $this->restore_file = restore_path() . "/backup_{$this->current_time}.zip";
     $synchronizer = new Synchronize($this);
     $synchronizer->startBackup();
     return Response::download($this->backup_file, "backup_{$this->current_time}.zip");
 }
Beispiel #3
0
 /**
  * Restore the database and modules from the restore file
  * @param  string $restore_file "The location of teh restore zip file"
  */
 public function restore($restore_file)
 {
     $this->Unzip($restore_file, restore_path());
     $restore_dir = restore_path() . '/backup';
     // $this->dropTables();
     $this->restoreDB($restore_dir);
     $this->restoreModules($restore_dir);
     $this->restorePublic($restore_dir);
 }
Beispiel #4
0
 /**
  * Restore the database and modules from the restore file
  * @param  string $restore_file "The location of teh restore zip file"
  */
 public function restore($restore_file)
 {
     @ini_set('max_execution_time', 300);
     // Temporarily increase maximum execution time
     $this->Unzip($restore_file, restore_path());
     $restore_dir = restore_path() . '/backup';
     // $this->dropTables();
     $this->restoreDB($restore_dir);
     $this->restoreModules($restore_dir);
     $this->restorePublic($restore_dir);
 }