mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-02-08 06:48:00 +00:00
Merge pull request #2428 from nextcloud/enh/noid/borg-retention-policy
allow to adjust borgs retention policy
This commit is contained in:
commit
ef43d19a27
9 changed files with 24 additions and 8 deletions
|
|
@ -581,6 +581,13 @@ class ConfigurationManager
|
|||
return $this->GetEnvironmentalVariableOrConfig($envVariableName, $configName, $defaultValue);
|
||||
}
|
||||
|
||||
public function GetBorgRetentionPolicy() : string {
|
||||
$envVariableName = 'BORG_RETENTION_POLICY';
|
||||
$configName = 'borg_retention_policy';
|
||||
$defaultValue = '--keep-within=7d --keep-weekly=4 --keep-monthly=6';
|
||||
return $this->GetEnvironmentalVariableOrConfig($envVariableName, $configName, $defaultValue);
|
||||
}
|
||||
|
||||
public function GetDockerSocketPath() : string {
|
||||
$envVariableName = 'WATCHTOWER_DOCKER_SOCKET_PATH';
|
||||
$configName = 'docker_socket_path';
|
||||
|
|
|
|||
|
|
@ -328,6 +328,8 @@ class DockerActionManager
|
|||
$replacements[1] = $this->configurationManager->GetNextcloudMemoryLimit();
|
||||
} elseif ($out[1] === 'NEXTCLOUD_MAX_TIME') {
|
||||
$replacements[1] = $this->configurationManager->GetNextcloudMaxTime();
|
||||
} elseif ($out[1] === 'BORG_RETENTION_POLICY') {
|
||||
$replacements[1] = $this->configurationManager->GetBorgRetentionPolicy();
|
||||
} elseif ($out[1] === 'NEXTCLOUD_TRUSTED_CACERTS_DIR') {
|
||||
$replacements[1] = $this->configurationManager->GetTrustedCacertsDir();
|
||||
} elseif ($out[1] === 'ADDITIONAL_DIRECTORIES_BACKUP') {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue