mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-05-28 14:30:13 +00:00
aio-interface: also reset the borg backup cache when resetting the backup path
Signed-off-by: Simon L. <szaimen@e.mail.de>
This commit is contained in:
committed by
Simon L.
parent
39f30a6609
commit
172c72f735
@@ -145,6 +145,27 @@ readonly class DockerActionManager {
|
||||
}
|
||||
}
|
||||
|
||||
public function deleteBorgBackupConfig(): void {
|
||||
// Delete the borgbackup container
|
||||
$id = 'nextcloud-aio-borgbackup';
|
||||
$borgbackupContainer = $this->containerDefinitionFetcher->GetContainerById($id);
|
||||
$this->DeleteContainer($borgbackupContainer);
|
||||
|
||||
// Delete the borg cache volume
|
||||
$url = $this->BuildApiUrl('volumes/nextcloud_aio_backup_cache');
|
||||
try {
|
||||
$this->guzzleClient->delete($url);
|
||||
error_log('nextcloud_aio_backup_cache volume deleted successfully.');
|
||||
} catch (RequestException $e) {
|
||||
if ($e->getCode() !== 404) {
|
||||
error_log('Could not delete nextcloud_aio_backup_cache volume: ' . $e->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
// Clear the configuration variables and files
|
||||
$this->configurationManager->deleteBorgBackupLocationItems();
|
||||
}
|
||||
|
||||
public function GetLogs(string $id, string $since = ''): string {
|
||||
$url = $this->BuildApiUrl(
|
||||
sprintf(
|
||||
|
||||
Reference in New Issue
Block a user