From 7b735ea9417c0b95bd49a095e3985035bbbf34b6 Mon Sep 17 00:00:00 2001 From: Dillard Blom Date: Sun, 18 Oct 2026 01:45:39 +0200 Subject: [PATCH] DR guide step 7 for rc2; changelog; version 0.9.8 --- CHANGELOG.md | 30 +++++++++++++++++++++++++++++- appinfo/info.xml | 2 +- docs/DISASTER-RECOVERY.md | 21 ++++++++++++--------- 3 files changed, 42 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ffde11f..edd6468 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,8 +9,36 @@ instead carried by the app description, the git tag, the release, and this file. ## [Unreleased] +Fixes from a full disaster recovery test of a production instance (about 1 TB, Nextcloud +All-in-One onto a plain Nextcloud with PostgreSQL). + +### Added +- `docs/DISASTER-RECOVERY.md`: step-by-step guide for when your server is gone. +- `occ backup:restore:full --install-apps` installs (from the app store) or enables the apps the + old server had enabled, before the restore starts. + ### Changed -- A fuller app store description, ready for 1.0.0. +- Backups record the structure of every database table. A full restore creates tables that do not + exist on the new instance, for example those left behind by an app that was removed long ago or + is switched off, instead of stopping at the first one. +- A full restore no longer refuses when apps are missing: it restores their data and lists the + apps to install afterwards. `nextcloud-aio` is never required, so a backup of Nextcloud + All-in-One can be restored onto a plain Nextcloud. +- All problems are listed at once, with the app each missing table probably belongs to. For + backups made before this version, `--skip-missing-tables` leaves out tables whose structure is + unknown. +- A fuller app store description, ready for 1.0.0, and a note on paid restore help by Ensembia. +- README: switching the server to TCP BBR made backups over a long distance about 3 times faster. + +### Fixed +- A full restore failed on foreign keys (for example those of the Mail app), because tables are + restored in name order. Foreign keys are now checked after all rows are loaded, before the + restore commits. +- `occ backup:target:add` without a key pointed to `backup:key:init`, which makes a new key that + cannot read existing backups. It now points to `backup:key:import` for a restore, and says that + connecting to a location with backups can take a while. +- Removing a location left its cached index in the database (tens of thousands of rows for a large + backup). It is removed with the location now, and once for locations that are already gone. ## [1.0.0-rc.1] - 2026-10-17 diff --git a/appinfo/info.xml b/appinfo/info.xml index f0bfb3f..efe6cc8 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -41,7 +41,7 @@ welcome: use the "Share your experience" link on the admin page. Developed and sponsored by [Ensembia](https://www.ensembia.com), which also offers paid help with restoring a backup after a crash.]]> - 0.9.7 + 0.9.8 agpl Dillard Blom NgBackup diff --git a/docs/DISASTER-RECOVERY.md b/docs/DISASTER-RECOVERY.md index 05f6226..5861db4 100644 --- a/docs/DISASTER-RECOVERY.md +++ b/docs/DISASTER-RECOVERY.md @@ -76,18 +76,21 @@ with a different key"). occ backup:list offsite -**7. Install the apps the old server had.** Run the restore; before it changes anything it checks -the apps and stops with what is missing: +**7. Start the restore, and let it install the apps.** - occ backup:restore:full offsite + occ backup:restore:full offsite --install-apps -- "install these apps first: …": install each from the app store (`occ app:install `), or - enable it if it is part of Nextcloud but switched off (`occ app:enable `, for example - `admin_audit`). Apps that are not in the app store: copy them into `custom_apps` and enable them. -- "Table … does not exist here": an app that was removed or switched off long ago left tables - behind. Install that app (for example `deck`, `onlyoffice`), then run the restore again. +`--install-apps` first installs every app the old server had enabled from the app store (or +switches it on, if it is part of Nextcloud). Tables of apps that are missing or were removed long +ago are created from the backup, so they do not stop the restore. -Repeat until the restore starts. +At the end it lists the apps it could not install, usually your own builds that are not in the +app store. Copy those into `custom_apps` and enable them (`occ app:enable `); their data is +already restored. + +Backups made before 1.0.0-rc.2 do not record the structure of their tables. If the restore lists +tables that do not exist here, install the apps they belong to and run it again, or leave them +out with `--skip-missing-tables`. **8. Let the restore run.** It restores the database, then the data directory, and takes hours for a large backup. If it stops halfway, fix the cause and run the same command again with `--force`.