Example #1
0
 /**
  * Restore a checkpoint by id
  * @param string $checkpointId id of checkpoint
  * @return array
  * @throws UnexpectedValueException if there is no checkpoint with this id
  */
 public function restore($checkpointId)
 {
     $this->assertCheckpointExists($checkpointId);
     $checkpointDir = $this->locator->getCheckpointDir() . '/' . $checkpointId;
     $ocRoot = $this->locator->getOwnCloudRootPath();
     $this->fsHelper->copyr($checkpointDir . '/' . self::CORE_DIR, $ocRoot, false);
     $this->fsHelper->copyr($checkpointDir . '/' . self::APP_DIR, $ocRoot . '/' . self::APP_DIR, false);
 }