Ejemplo n.º 1
0
 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";
 }
Ejemplo n.º 2
0
 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");
 }
Ejemplo n.º 3
0
 /**
  * Backup the public folder
  * @param  string $current_time "Current time in string"
  */
 public function backupPublic($current_time)
 {
     $uploads_path = public_path() . '/uploads';
     $destination = backup_path() . "/backup/uploads";
     $status = File::copyDirectory($uploads_path, $destination);
 }