Exemplo n.º 1
0
 /**
  * Get the MongoDB dump directory.
  *
  * @param  \phpbu\App\Backup\Target $target
  * @return string
  */
 public function getDumpDir(Target $target)
 {
     return $target->getPath() . '/dump';
 }
 /**
  * Returns the executable for this action.
  *
  * @param \phpbu\App\Backup\Target $target
  *
  * @return \phpbu\App\Cli\Executable
  */
 public function getExecutable(Target $target)
 {
     if (!$this->executable) {
         $this->executable = new Rsync();
         $this->executable->setSourceUser($this->user)->setSourceHost($this->host)->setSourcePort($this->port)->setSourcePath($this->path)->exclude($this->excludes)->compressed($target->shouldBeCompressed())->setTargetPath($target->getPath());
     }
     return $this->executable;
 }
Exemplo n.º 3
0
 /**
  * Return sync source.
  *
  * @param  \phpbu\App\Backup\Target
  * @return string
  */
 public function getSyncSource(Target $target)
 {
     return $this->isDirSync ? $target->getPath() : $target->getPathname();
 }