protected function fixDatadirSymlinks($remote_host, $remote_dir, $target_dir)
	{
		$this->log('fixDatadirSymlinks', LOG_DEBUG);

		if (empty($this->data_dirs))
            return;

        $this->log('Creating data dir symlinks:', LOG_DEBUG);

        $cmd = "cd $remote_dir/{$target_dir}; php {$this->datadir_patcher} --datadir-prefix={$this->data_dir_prefix} --previous-dir={$this->last_remote_target_dir} ". implode(' ', $this->data_dirs);

        $output = array();
        $return = null;
        $this->sshExec($remote_host, $cmd, $output, $return);

        $this->log($output);
	}