Nextcloud restore after reinstall/restore of nethserver

After reinstall of a nethserver and restic restore I could not log into nextcloud. I disabled fail2ban as my ip was blocked. I connected to db with mysql -u nextcloud -p and the pw found in /var/lib/nethserver/secrets/nextcloud and deleted the entries for oc_bruteforce_attempts.

But for some reason, it did not let me login with an ad account. I fixed that by yum remove nethserver-nextcloud nextcloud and reinstall nextcloud. Next problem was that all the nextcloud apps are not installed. I logged in with admin user’s default password. I would like to re-install or transfer all apps that were installed on the old instance (preferably not one by one manually) and restore apps contents. I see that the files and folders were restored but not the calendars, contacts and passwords in password app.

Thanks in advance for your hints on how to re-establish the state of the old nextcloud instance.

After re-installing the calendar app manually, I see that the calendars of our users are not there, so they apparently are not part of the backup. (Which path to add to restic backup so that for a next restore whole nextloud content would be backuped too?)

How can those caldav/carddav calendars and adressbooks be restored? I still have the old instance of nethserver around, but need to know howto transfer the data of all nextcloud apps and preferable all settings of configured nextcloud including its apps or at minimum the data of the existing users calendars and addressbooks and password app to the newly installed nethserver.

As I dont want to have both server booted in the same time I’d like to know how to tar.gz which folder(s) and with what options, so that the untar on the new instance will preserve access rights and everything.

I found this so it should be doable, but I don’t want to screw my new setup nethserver, so I would apreciate some help on this. Also I have the possibility to rsync to an intermediate share from the old server then boot the new one and rsync to the new nethserver/nextcloud server.

Apparently the restic backup was the problem. I deleted the whole backup, and took a new full backup from the source nethserver I want to replace, an restored it. That way nextcloud came back configured as it was before :slight_smile:

That leads to question why the backup was the problem. Checking integrity and consistency could’ve given some clues on what was at fault (archive, media, original info not included in backup…), or at least discard the backup repository/archive from the equation.

1 Like

Well the host on which this nethserver was restored already had suffered from datacorruption due to a failed disk which was only discovered while being in the process of breakting the mdraid mirror to create a zfs mirror, which lead to a reinstall of the host. Maybe the vzdump I ad takenof this vm was already corrupt. Frankly - although I kept a copy of the corrupt restic backup, my primary goal was to get the newly installed server up and running so our employes can work on the new system monday. And thats done now. And I don’t have the nerves to check why the backup had a problem, although your question is very legitimate. But I’ll leave it at that and take the hours of work, I had this weekend as a learning experience and will delete the corrupt backup to free the space :slight_smile:

1 Like