Observations while doing disaster recovery

I am writing this down mainly to have a reminder on what to additionally do, after a restore for myself.

  • preshared key on the opvn s2s tunnel was not there, so I had to copy / paste it from the client side. (How can this be included in config or data backup)

  • nextcloud files were restored, but not the content of the other apps, ex. calendar, addressbook, passwords (How can this be included in config or data backup). Also login to nextcloud with ad credentials did not work upon reinstall of nethserver after the restore. admin account credentials then were reset to standard neth nextcloud password. I opened a separate post for restore nextcloud and hope, there is a way to restore calendars, adressbooks and passwords, maybe even the whole nextcloud instance.

  • ssh keys for cert. login are not restored (possible to just add this path in databackup?)

  • custom script, I placed for update of letsencrypt certificates to other servers:
    /etc/e-smith/events/certificate-update/S80push2router

  • installation of qemu-guest-agent, mlocate and nano

  • some emails were owned by root -> chown -R vmail:vmail /var/lb/nethserver/vmail

  • redis needed a reinstall - as it hat many errors in its log (access denied blabla)

  • connector does not work - mails from external mailbox are not retreived.

@Elleni

Hi

See this here about inclusion (in your backups):

https://docs.nethserver.org/en/v7/backup_customization.html

NextCloud:
You need a dump of the MariaDB used for Nextcloud, this should be dumped into the NethServer locally, and then backuped along with other NethServer stuff. This is, AFAIK, standard and automatic in NethServer.

The DB needs to be restored, then you should have calender & addressbook stuff, indeed, almost everything in NextCloud, as it uses MariaDB intensively!

My 2 cents
Andy

1 Like

Hi Andy,

I was under the impression that official nextcloud apps are included, which they are as nextcloud does work, even with file app and its content is obviously included in the backup.

What I need to know is which other folders would need to be included for nextcloud to get calendars, adressbooks and passwords, maybe even the whole nextcloud configuration as is backuped.

I will try what happens if I backup with additional includes of:

/var/lib/nethserver/nextcloud and
/usr/share/nextcloud

But I don’t know if that will be enough.

Maybe the mariadb is dumped and restored automatically along with backup/restore but as /usr/share/nextcloud and /var/lib/nethserver/nextcloud are not included, at least not the former, that might be the reason why it restored files only but not all the other apps in nextcloud? I will try again again with a new backup, and report back later.

See here:

/var/lib/nethserver/backup

As I saw that while restoring restic printed errors in /var/logmessages of files not found, I deleted the whole backup content, and created a new fullbackup which I restored over. That brought back my whole nextcloud as it was. A new problem arose though, for which I created a separate thread.

Next problem: inbox access due to some files owned by root instead of vmail. Fixed.

Next problem: rspamd not working due to redis apparently gone / not installed. Investigating…

systemctl status redis-rspamd
â—Ź redis-rspamd.service - Redis persistent key-value database Rspamd
Loaded: loaded (/usr/lib/systemd/system/redis-rspamd.service; static; vendor preset: disabled)
Active: failed (Result: exit-code) since Sun 2020-11-08 11:55:01 CET; 1min 27s ago
Process: 25070 ExecStart=/usr/bin/redis-server /etc/redis-rspamd.conf --daemonize no (code=exited, status=1/FAILURE)
Main PID: 25070 (code=exited, status=1/FAILURE)

Nov 08 11:55:01 hostname.domain systemd[1]: Started Redis persistent key-value database Rspamd.
Nov 08 11:55:01 hostname.domain systemd[1]: redis-rspamd.service: main process exited, code=exited, status=1/FAILURE
Nov 08 11:55:01 hostname.domain systemd[1]: Unit redis-rspamd.service entered failed state.
Nov 08 11:55:01 hostname.domain systemd[1]: redis-rspamd.service failed.
Hint: Some lines were ellipsized, use -l to show in full.Preformatted text

-> reinstalled redis - fixed.

Edit to add that while reinstalling redis re-enabled the display of the rspamd page, but new mails were not visible in the history tab. This was not fixed by yum reinstall nethserver-mail-filter. So I’ll have a look at this. To really fix this I did:

  • yum remove nethserver-mail-filter, yum autoremove than installed it again. Finally I re-installed the connector and recreated the entries for our users (see below why). Now everything is up and running :slight_smile:
  • connector in email does not work. Emails are not retrieved. Hopefully the last headache to fix for today - investigating.

Deleting the connector entry for my mailbox and re-creating it fixed it for my mailbox.

I dont know if this behaviour is related with this modification, I had made for shorter intervalls for mailchecking.