Page MenuHomeSoftware Heritage

repository.pp
No OneTemporary

repository.pp

# Definition of a Borg Backup repository server
define profile::borg::repository (
String $encryption,
String $passphrase,
String $authorized_key,
String $fqdn = $title,
){
include profile::borg::repository_base
$user = $profile::borg::repository_base::user
$fullpath = "${profile::borg::repository_base::repository_path}/${fqdn}"
$borg_authorized_keys = $profile::borg::repository_base::authorized_keys
exec {"borg init --encryption=${encryption} ${fullpath}":
user => $user,
path => ['/bin', '/usr/bin'],
creates => $fullpath,
environment => "BORG_PASSPHRASE=${passphrase}",
require => Package['borgbackup'],
}
::concat::fragment {"borg-authorized-keys-${fullpath}":
target => $borg_authorized_keys,
order => '10',
content => "command=\"borg serve --restrict-to-path ${fullpath}\",restrict ${authorized_key}\n",
tag => 'borg-authorized-keys',
}
}

File Metadata

Mime Type
text/plain
Expires
Sat, Jun 21, 9:06 PM (4 w, 17 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3241085

Event Timeline