A restore that stops at a file gone from the location points at --salvage; test a full restore with a damaged and a missing pack

The DR test of 1.0.2 over SMB is done: result in PLAN, empty folders as a known issue (#27).
This commit is contained in:
2026-11-06 10:27:41 +01:00
parent 74bfa7052f
commit b625fe7666
7 changed files with 114 additions and 4 deletions
+1 -1
View File
@@ -111,7 +111,7 @@ HELP);
$output->writeln('If this happened after the restore had started, the instance may be partly restored: fix the cause and run the same command again with --force.');
}
$output->writeln('If occ then says that Nextcloud needs an upgrade (the database is already the old server\'s), run occ upgrade first.');
if (!$input->getOption('salvage') && ($e instanceof \OCA\NgBackup\Repository\RepositoryException || $e instanceof \OCA\NgBackup\Crypto\CryptoException)) {
if (!$input->getOption('salvage') && Restore::backupLooksDamaged($e)) {
$output->writeln('The backup itself looks damaged here. --salvage restores everything that can be read and lists the rest.');
}
return 1;