--salvage for backup:restore and backup:restore:full: restore what can be read from a damaged backup

A file whose data cannot be read or decrypted is left out and listed, and
the command exits with code 2. When the database cannot be restored (its
dump is damaged, or it does not fit this installation), backup:restore:full
leaves the fresh database as it is and puts the data directory and config of
the backup in ngb-salvage-<snapshot> in the data directory. Without --salvage
a restore of damaged data stops as before and points at the option.
This commit is contained in:
2026-11-04 04:08:20 +01:00
parent f0293e6d01
commit dfe1fe9aad
9 changed files with 369 additions and 78 deletions
+2
View File
@@ -138,3 +138,5 @@ jobs:
run: tests/integration/full-restore-roundtrip.sh 35-apache mysql to-sqlite
- name: Full restore of a SQLite backup onto PostgreSQL
run: tests/integration/full-restore-roundtrip.sh 35-apache sqlite to-pgsql
- name: Full restore with a damaged database dump (--salvage)
run: tests/integration/full-restore-roundtrip.sh 35-apache sqlite salvage