public function setArchiveFromFiles($workingDir) {
		$commands = array();
		if($this->Mode == 'db') {
			if (file_exists($workingDir . '/database.sql')) {
				$commands[] = 'gzip database.sql';
			}
			$commands[] = sprintf('tar -cf %s database.sql.gz', $this->ArchiveFile()->FullPath);
			$commands[] = 'rm -f database.sql.gz';
		} elseif($this->Mode == 'assets') {
			$commands[] = 'GZIP=-1 tar --dereference -czf assets.tar.gz assets';
			$commands[] = sprintf('tar -cf %s assets.tar.gz', $this->ArchiveFile()->FullPath);
			$commands[] = 'rm -f assets.tar.gz';
		} else {
			if (file_exists($workingDir . '/database.sql')) {
				$commands[] = 'gzip database.sql';
			}
			$commands[] = 'GZIP=-1 tar --dereference -czf assets.tar.gz assets';
			$commands[] = sprintf('tar -cf %s database.sql.gz assets.tar.gz', $this->ArchiveFile()->FullPath);
			$commands[] = 'rm -f database.sql.gz assets.tar.gz';
		}

		$process = new Process(implode(' && ', $commands), $workingDir);
		$process->setTimeout(3600);
		$process->run();
		if(!$process->isSuccessful()) {
			throw new RuntimeException($process->getErrorOutput());
		}

		$this->write();

		return true;
	}