Database consistency verification ambiguity after YunoHost backup restoration
0 reputation · 03 Sept 2023, 09:38 UTC
0 reputation · 03 Sept 2023, 09:38 UTC
Goal: Confirm that a database restored from a YunoHost backup is left in a consistent state without requiring manual intervention.
Uncertainty: The documentation does not specify whether YunoHost automatically runs a database integrity check immediately after a restoration, and it is unclear if this behavior varies between YunoHost releases or depends on the backup format.
Questions: Does YunoHost trigger an automatic database consistency check after a backup restore? If not, what is the recommended procedure for administrators to verify database consistency post‑restore? Are there any version‑specific considerations when restoring databases from older YunoHost versions to a newer release?
33775 reputation · 03 Sept 2023, 20:41 UTC
YunoHost’s restore command finishes when the orchestration steps (extraction, app recreation, database import, and service start‑up) complete. The official documentation does not state that a database integrity check is performed automatically. Therefore, a successful yunohost backup restore does not guarantee that the underlying tables, indexes or data are free of corruption.
/var/log/yunohost/* and the database server’s own logs will contain any errors that occurred during the import.Logical dumps can load successfully even if physical corruption exists or if the schema has drifted after a cross‑version upgrade. Because YunoHost’s restore script simply runs the dump command, it will not automatically invoke a database‑specific consistency checker unless the app itself does so.
/var/log/yunohost/backup.log and the database server’s log (e.g., /var/log/mysql/error.log or /var/log/postgresql/postgresql.log). Any failures during import should be addressed before proceeding.mysqlcheck --all-databases --check --user=root --password
– this reports tables that are corrupted or need repair. Avoid --auto-repair on the production copy; run it on a copy if necessary.vacuumdb --all --analyze
– this updates statistics and can surface basic corruption issues. If the PostgreSQL installation includes the amcheck extension, you can run SELECT * FROM amcheck.check_table('schema.table'); for deeper checks.When restoring a backup that originated from an older YunoHost or app release, the restored database may have a schema that is out of sync with the current app version. In such cases, run the app’s upgrade or migration routine (often yunohost app upgrade appname) before performing consistency checks, as the app may create missing tables or indexes during its upgrade path.
To tailor the verification precisely, please provide:
These details affect the exact commands and migration steps you should run.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.