fixes for restore

This commit is contained in:
Andy Miller
2025-10-18 17:54:29 -06:00
parent 84cf62bc7b
commit 1e14c47d28
4 changed files with 57 additions and 5 deletions

View File

@@ -696,6 +696,11 @@ class SafeUpgradeManager
*/
public function run(array $options = []): array
{
$operation = isset($options['operation']) ? (string)$options['operation'] : 'upgrade';
if ($operation === 'restore') {
return $this->runRestore($options);
}
$force = (bool)($options['force'] ?? false);
$timeout = (int)($options['timeout'] ?? 30);
$overwrite = (bool)($options['overwrite'] ?? false);
@@ -852,7 +857,7 @@ class SafeUpgradeManager
return $this->errorResult('Snapshot identifier is required.', ['operation' => 'restore']);
}
$this->setProgress('restoring', sprintf('Restoring snapshot %s...', $snapshotId), null, [
$this->setProgress('rollback', sprintf('Restoring snapshot %s...', $snapshotId), null, [
'operation' => 'restore',
'snapshot' => $snapshotId,
]);