allow to repair the integrity of the backup archive

Signed-off-by: Simon L <szaimen@e.mail.de>
This commit is contained in:
Simon L 2023-01-04 15:38:59 +01:00
parent 480b3193d4
commit 6b91fb7ca2
5 changed files with 55 additions and 3 deletions

View file

@ -113,6 +113,22 @@ class DockerController
return $response->withStatus(201)->withHeader('Location', '/');
}
public function StartBackupContainerCheckRepair(Request $request, Response $response, array $args) : Response {
$config = $this->configurationManager->GetConfig();
$config['backup-mode'] = 'check-repair';
$this->configurationManager->WriteConfig($config);
$id = 'nextcloud-aio-borgbackup';
$this->PerformRecursiveContainerStart($id);
// Restore to backup check which is needed to make the UI logic work correctly
$config = $this->configurationManager->GetConfig();
$config['backup-mode'] = 'check';
$this->configurationManager->WriteConfig($config);
return $response->withStatus(201)->withHeader('Location', '/');
}
public function StartBackupContainerTest(Request $request, Response $response, array $args) : Response {
$config = $this->configurationManager->GetConfig();
$config['backup-mode'] = 'test';