public function postRestore()
 {
     Sentry::logout();
     $synchronizer = new Synchronize($this);
     $restore_file = $synchronizer->copyToRestore(Input::all());
     $synchronizer->restore($restore_file);
     return Redirect::to('/');
 }
示例#2
0
 public function postRestore()
 {
     $input = Input::all();
     $synchronizer = new Synchronize($this);
     if (isset($input['backup_id'])) {
         $backup = Backup::findOrFail($input['backup_id']);
         $restore_file = $backup->file;
     } else {
         $restore_file = $synchronizer->copyToRestore($input);
     }
     Sentry::logout();
     $synchronizer->restore($restore_file);
     return Redirect::to('/');
 }