Merge pull request #1670 from nextcloud/enh/1537/repair-integrity

allow to repair the integrity of the backup archive
This commit is contained in:
Simon L 2023-01-04 16:21:45 +01:00 committed by GitHub
commit c0e22efdbc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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';