Restoring apps after broken 'yunohosh postinstall'

Sorry for not yet including platform (Orange Pi, have to check which one, I think via Armbian) and versions (relatively new, less than half a year); I will add those later. Maybe it is not necessary for my problem.

TL;DR: will old app-data (Wordpress, nextcloud) be found when reinstalling?

Long version:

The installation of Yunohost went very well. Some apps were installed (nextcloud, opensondage, roundcube, wordpress), and a letsencrypt certificate was added with no problem.

After a couple of weeks/months, the admin page was not available anymore: please run yunohost tools postinstall.

The postinstall gave an error (invalid password) all the time, but no changes were necessary and other things caught my attention, until the certificate expired a couple of days ago.

There was no way to access the web GUI, either as a user or as an admin. Via CLI access was possible, but no yunohost-commands were available.

At first, to get a valid certificate, I used part of the pre-2.5-letsencrypt ( alexAubin/ letsencrypt_ynh ), so the site was available for users and visitors.

Now I was set on solving the admin page as well, and the postinstall.

I did manage to break more, by purging slapd and reinstalling yunohost. Login was not possible anymore for users, and postinstall still did not work.

Then I came accross Alex’s resetpostinstall, which let me finally run the postinstall.

Of course all configuration is gone now.

Since postinstall was broken before I made any backups, I don’t have any backup.

The configuration can be done again, but I do not want to lose user data, especially wordpress and nexctloud.

Can I reinstall the apps, and will it reuse the old database? Or will it make a new random password? Is, together with the configuration, all access to the database impossible?

Which datafiles do I need to save?

PS: web admin gives 403-forbidden

Uuuugh … well it sounds like to solve the initial issue, all you had to do was to touch /etc/yunohost/installed (still that doesn’t really explain why that file magically disappeared, because there’s simply no reason for it to just disappear … though that’s not the first time I see users reporting this - but anyway)

But now it sounds much more complex … I’m pretty sure that you may still produce a dump or the mysqld (and copy files stored in nextcloud somehow) using some mysqldump command with the appropriate option, but it’s not straightforward to find out the right stuff to do without a proper access to the machine :confused:

Thanks for your quick reply! I was afraid the initial issue would have a cause like that, but I could not find out what the cause was, or why it insisted on not being installed anymore. I should have asked earlier.

In case it seems to happen now and again, would it be an option to give a hint in the logging of postinstall, “Are you sure YNH is already installed, then have a look at this or that helpfile/webpage or remove /etc/yunohost/installed”?

I do have access to the machine, either by removing the uSD card or via terminal (I have access via either SSH or serial and can still sudo with the account inherited from Armbian).

Is there anything I can do with the files in /var/lib/mysql? My first prority is extracting posts and pages from Wordpress, and images from nextcloud.

Mostly those I can save, I think:

  • So far I found out, that /var/lib/mysql/wordpress/wp_posts.ibd is not encrypted, so as a last resort, I can strip readable text.
  • Nextcloud files seem to reside in /home/ , so those I can reach as well.

I would love advice on the course to take to get a working system:

  1. Take new uSD-card, reinstall from scratch. Takes a night, then see how to import posts and pages from Wordpress; images from nextcloud are safe now, so no concern.
  2. Take this uSD-card, that almost runs now, and try to fix it. Having lost the YNH-config-files I think most of it will be reinstalling anyway, and the admin pages are not accessible yet. I still need to import posts and pages anyway.

Hmm… Having listed those, see the benefit of going with the first option.

Final question then: do you have an advice on how to export/import the Wordpress-posts/pages? I can save myself from here, but if you have a hint I could save me a lot of searching.

Last but not least: I love the Yuhohost-system, thank you (and others) for the time invested!

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.