rework the daily backup script and allow to start the backup check from it

Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
szaimen 2022-08-31 14:00:37 +02:00
parent ed82a41bc1
commit d6e1f62202
4 changed files with 47 additions and 6 deletions

View file

@ -86,14 +86,17 @@ class DockerController
}
public function StartBackupContainerCheck(Request $request, Response $response, $args) : Response {
$this->checkBackup();
return $response->withStatus(201)->withHeader('Location', '/');
}
public function checkBackup() : void {
$config = $this->configurationManager->GetConfig();
$config['backup-mode'] = 'check';
$this->configurationManager->WriteConfig($config);
$id = 'nextcloud-aio-borgbackup';
$this->PerformRecursiveContainerStart($id);
return $response->withStatus(201)->withHeader('Location', '/');
}
public function StartBackupContainerRestore(Request $request, Response $response, $args) : Response {