What type of hardware are you using: Old laptop or computer
What YunoHost version are you running: 12.0.9
How are you able to access your server: The webadmin
SSH
Direct access via physical keyboard/screen
Are you in a special context or did you perform specific tweaking on your YunoHost instance ?: SSD is dying, so I am migrating to a new HDD on the same machine
Describe your issue
TL;DR generic problem
When I yunohost backup restore
a whole system backup it:
- takes a long long time (i.e. overnight!)
- and does not restore apps
- (it does restore system settings, users and their homes, as well as shared folder)
Same happens regardless if I restore the whole backup from CLI or just a specific app via WebUI.
Actual problem I am running into
Hardware and software
What we’re dealing with is a dedicated AMD64 (Ryzen 5) box with 32 GB RAM and …
before the migration
- 1 TB NVMe M.2 SSD (Samsung 990 Pro; less than a year old) – let’s call it dyingSSD – this is where the whole Yunohost 11 system is (Ext4) – mounted to
/
- 1 TB SATA HDD (2.5" WD Red; 7 years old) – let’s call it oldHDD1 – this is where yunohost backups went to (Btrfs) – mounted to
/home/yunohost.backup
- 1 TB SATA HDD (2.5" WD Red; 5 years old) – let’s call it oldHDD2 – disk from old borg backup server, so still has old borg backups of family PCs (Ext4)
I happily ran Yunohost 11 on that until one was SMART started screaming that the dyingSSD is failing. So I went and bought a new set of disks.
after migration
- dyingSSD – unmounted and to be removed ASAP, but still alive, it seems
- oldHDD1 – mounted to
/home/yunohost.backup
- oldHDD2
- 4 TB SATA HDD (3.5" Seagate IronWolf, new) – let’s call it newHDD1 – this is where I have Yunohost 12 installed on now (ESP, Btrfs) – mounted to
/
- 4 TB SATA HDD (3.5" WD Red Plus, new) – let’s call it newHDD2 – this is currently a spare disk, will be added to Btrfs RAID1 with the above disk soon though
(please let’s not discuss the disk/partition layout or backup strategy here; there is a separate thread for that)
What I have done so far
After much trial-and-error (incl. not finding Yunohost 11 official ISO anymore, and failing to install from Yunohost 12 ISO) and help via the Yunohost XMPP/Matrix chat I did the following:
yunohost backup create
when still booting Yunohost 11 from dyingSSD and onto oldHDD1 – this ended up being a 220 GB system backup, with all(?) the apps etc.- install Debian 12 on newHDD1 with Btrfs following Installing Debian for Yunohost | Yunohost Documentation
- installed Yunohost 12 following Install YunoHost | Yunohost Documentation
- ran
yunohost backup restore 20241215-193442
following Backups | Yunohost Documentation
The last step took overnight. Even though the logs claim it was done pretty fast, I was sitting through it for many hours watching the CLI and its Preparing archive for restoration
message, went to bed, and continued watching that message for another few hours before it finished. iotop
was also clearly showing it was working all that time.
What migrated / restored from the backup and what did not
What seems to have migrated well:
- system settings
- domains
- users
- user homes, including the shared folders
/var/mail/
(although oddly enough I don’t have permission to read my own mailbox there)
What did not migrate though is:
- apps – I cannot see any apps in either user or admin WebUI
- app settings
/home/yunohost.app/
is also empty
So I logged into the admin WebUI and in /yunohost/admin/#/backup/local
selected the same system 220 GB backup and checked to restore just my Pelican blog, a redirect to it and some static HTML (webpage FAQ). Again, it took well overnight, and again, the apps are not restored – not even the simple static HTML.
HELP!
While this topic is about how to restore from backups, ultimately I just want to end up with a working Yunohost server again and migrate from the backup (or the SSD).
My current Yunohost 12 install is basically empty and not really working (see bonus issue below), so I am open to more drastic solutions too.
Bonus big problem
After all this – and potentially unconnected – I am currently in a situation where I can’t update packages either through yunohost
or apt
.
sudo yunohost tools upgrade
Error: You cannot do this right now because dpkg/APT (the system package managers) seems to be in a broken state… You can try to solve this issue by connecting through SSH and running `sudo apt install --fix-broken` and/or `sudo dpkg --configure -a` and/or `sudo dpkg --audit`.
sudo apt install --fix-broken
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 4 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up yunohost (12.0.9) ...
Regenerating configuration, this might take a while...
Error: Could not find scrutiny in the list of installed apps:
*
dpkg: error processing package yunohost (--configure):
installed yunohost package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
yunohost
E: Sub-process /usr/bin/dpkg returned an error code (1)
sudo dpkg --configure -a
Setting up yunohost (12.0.9) ...
Regenerating configuration, this might take a while...
Error: Could not find scrutiny in the list of installed apps:
*
dpkg: error processing package yunohost (--configure):
installed yunohost package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
yunohost
sudo dpkg --audit
The following packages are only half configured, probably due to problems
configuring them the first time. The configuration should be retried using
dpkg --configure <package> or the configure menu option in dselect:
yunohost manageable and configured self-hosting server
sudo dpkg --configure yunohost
Setting up yunohost (12.0.9) ...
Regenerating configuration, this might take a while...
Error: Could not find scrutiny in the list of installed apps:
*
dpkg: error processing package yunohost (--configure):
installed yunohost package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
yunohost
Share relevant logs or error messages
Logs relevant to (post)install and restoring the system backup from CLI:
- Postinstall your YunoHost server: https://paste.yunohost.org/raw/cebisoxele
- Restore system from a backup archive: https://paste.yunohost.org/raw/uyopexeyus
- Regenerate system configurations ‘all’: https://paste.yunohost.org/raw/xobitisusi
- Delete permission ‘xmpp’: https://paste.yunohost.org/raw/ririvizegu
- Upgrade system packages: https://paste.yunohost.org/raw/obizucamox
Logs relevant to restoring my blog and static HTML via the WebAdmin:
- Renew ‘dafaq.wheremymonkeyis.at’ Let’s Encrypt certificate: https://paste.yunohost.org/raw/egaxofumep
- Restore ‘my_webapp’ from a backup archive: https://paste.yunohost.org/raw/zilicaxije
- Restore ‘pelican’ from a backup archive: https://paste.yunohost.org/raw/ekasamunih
- Restore ‘redirect__3’ from a backup archive: https://paste.yunohost.org/raw/zekiwuhaju