protected function directoryConfigToBackup(array $dir)
    {
        $backup = new Configuration\Backup($dir['source']['path'], false);
        // build source config
        $options = [
            'path' => $dir['source']['path'],
        ];

        // check for configuration options
        if (isset($dir['source']['options'])) {
            $options = array_merge($options, $dir['source']['options']);
        }
        $backup->setSource(new Configuration\Backup\Source('tar', $options));
        return $backup;
    }