Pi does not shut down properly

I’m setting up a new NC instance from a backup and encouter the same problem over and over.
Change some setting, import the old database and so on.
Then when I want to reboot or shutdown the system to make a backup of the USB-stick (with the system) the pi hangs in shutdown and the only way is to cut power. After that, the data is corrupted and i have to start from my last backup.

I just use:
sudo reboot,
sudo shutdown -h now

What am I missing? Could it be a problem not unmounting the backup drive before rebooting?
How should a proper shutdown process look like?
Btw. if I use the reboot or shutdown button in NCP-web panel it does nothing in this cases.
That’s not always the case.

Help is very appreciated!

Please share the output of ncp-report

Never encountered that issue before, but data corruption is a larger problem than restarting. Reads as your backup is corrupted. How exactly are you making and restoring the backup?

Hi @Oberlurch3000,
You are missing the required support template. Please fill this form out and edit into your post. Also please clarify exactly how you are installing NextcloudPi The more details the better.

This will give us the technical info and logs needed to help you! Thanks.

I’m running nextcloud for several years now on this system and this is new to me too.

So normally I shut down the system and make a backup of my system (SD card or USB-stick) before every update. I make this backups with Win32DiskImager. So in case something goes wrong i can restore the old system. That’s for the system itselfe.

The cloud’s data and database are stored on a seperate HDD and are backed up every night with borg backup on an other HDD. I think this data is not the problem since it’s not the first time for me restoring this.

In the past there were times where the system didn’t shut down how it should and I had to kill power. But it was very rare that this corrupted the file system. Also I never cared about how to shut down other than “sudo shutdown -h now.”

So since my system was broken and I wasn’t able to restore the SD card files (for other reasons) I set up a new instance installing a fresh 64bit raspian. Then I installed the latest NCpi via curl installer script and updated to NC 26.0.0.11 (this was also the version of my old instance). I installed screen, borg, log2ram and enabled USB-boot so far. I also copied the NC-apps I had installed on my old instance and set the rights.
The next step was to restore the database. That worked well so far and I could log in with all users and so on. NC control panel says everything is fine.

Before copying the 2TB of data I wanted to make a backup of the USB-stick with the system to safe everything. And that’s the point I’m doing the 6th time or so because the system didn’t shut down and I had to kill power.

I will post you the output of ncp-report as soon as I can.

1 Like

Flash drives are known to go bad eventually. Are you sure it’s still in good working order?

1 Like

I had the same problem with two different SD cards. But they are both aged. Because of that I switched to a USB-boot stick with log2ram installed to reduce load. As far as I can tell, the problem occured with the USB-stick too.

Excuse me for taking so long. That’s the output of ncp-report:

NextcloudPi diagnostics

NextcloudPi version  v1.51.1
NextcloudPi image    NextcloudPi_04-08-23
OS                   Debian GNU/Linux 11. 6.1.21-v8+ (aarch64)
automount            no
USB devices          sda
datadir              /opt/ncdata/data
data in SD           yes
data filesystem      ext2/ext3
data disk usage      4.8G/59G
rootfs usage         4.8G/59G
swapfile             /var/swap
dbdir                /var/lib/mysql
Nextcloud check      ok
Nextcloud version    26.0.0.11
HTTPD service        up
PHP service          up
MariaDB service      up
Redis service        up
HPB service          up
Postfix service      up
Internet check       ok
Public IPv4          ***REMOVED SENSITIVE VALUE***
Public IPv6          ***REMOVED SENSITIVE VALUE***
Port 80              open
Port 443             open
IP                   ***REMOVED SENSITIVE VALUE***
Gateway              ***REMOVED SENSITIVE VALUE***
Interface            eth0
Certificates         ***REMOVED SENSITIVE VALUE***
NAT loopback         no
Uptime               18min

Nextcloud configuration

{
    "system": {
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": {
            "0": "localhost",
            "1": "192.168.178.31",
            "2": "nextcloudpi.local",
            "3": "nextcloudpi",
            "4": "nextcloudpi.lan",
            "5": "nextcloudpi",
            "14": "nextcloudpi"
        },
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "26.0.0.11",
        "overwrite.cli.url": "https:\/\/nextcloudpi\/",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "timeout": 0,
            "password": "***REMOVED SENSITIVE VALUE***"
        },
        "tempdirectory": "\/opt\/ncdata\/data\/tmp",
        "mail_smtpmode": "sendmail",
        "mail_smtpauthtype": "LOGIN",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "preview_max_x": "2048",
        "preview_max_y": "2048",
        "jpeg_quality": "60",
        "overwriteprotocol": "https",
        "maintenance": false,
        "logfile": "\/opt\/ncdata\/data\/nextcloud.log",
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "htaccess.RewriteBase": "\/",
        "loglevel": "2",
        "log_type": "file",
        "default_phone_region": "DE",
        "theme": "",
        "app_install_overwrite": [
            "extract",
            "previewgenerator",
            "nextcloudpi",
            "richdocumentscode_arm64"
        ],
        "data-fingerprint": "1f3b817790aed05a104fbca892a11ca9"
    }
}

HTTPd logs

[Wed Apr 12 18:20:05.852654 2023] [ssl:warn] [pid 86182:tid 547934254144] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Wed Apr 12 18:20:05.858098 2023] [mpm_event:notice] [pid 86182:tid 547934254144] AH00489: Apache/2.4.56 (Debian) OpenSSL/1.1.1n configured -- resuming normal operations
[Wed Apr 12 18:20:05.858179 2023] [core:notice] [pid 86182:tid 547934254144] AH00094: Command line: '/usr/sbin/apache2'
[Wed Apr 12 18:22:42.534640 2023] [proxy_fcgi:error] [pid 86183:tid 547916251520] [remote 192.168.178.72:50367] AH01067: Failed to read FastCGI header
[Wed Apr 12 18:22:42.534692 2023] [proxy_fcgi:error] [pid 86183:tid 547916251520] (104)Connection reset by peer: [remote 192.168.178.72:50367] AH01075: Error dispatching request to :4443:
[Wed Apr 12 18:22:42.627358 2023] [mpm_event:notice] [pid 86182:tid 547934254144] AH00492: caught SIGWINCH, shutting down gracefully
[Wed Apr 12 18:22:46.141700 2023] [core:warn] [pid 86182:tid 547934254144] AH00045: child process 86183 still did not exit, sending a SIGTERM
[Wed Apr 12 18:22:48.143851 2023] [core:warn] [pid 86182:tid 547934254144] AH00045: child process 86183 still did not exit, sending a SIGTERM
[Wed Apr 12 18:22:50.146061 2023] [core:warn] [pid 86182:tid 547934254144] AH00045: child process 86183 still did not exit, sending a SIGTERM
[Wed Apr 12 18:22:52.148249 2023] [core:error] [pid 86182:tid 547934254144] AH00046: child process 86183 still did not exit, sending a SIGKILL
[Wed Apr 12 18:23:03.654537 2023] [ssl:warn] [pid 597:tid 548001199168] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Wed Apr 12 18:23:03.732135 2023] [ssl:warn] [pid 736:tid 548001199168] AH01909: localhost:4443:0 server certificate does NOT include an ID which matches the server name
[Wed Apr 12 18:23:03.738180 2023] [mpm_event:notice] [pid 736:tid 548001199168] AH00489: Apache/2.4.56 (Debian) OpenSSL/1.1.1n configured -- resuming normal operations
[Wed Apr 12 18:23:03.738272 2023] [core:notice] [pid 736:tid 548001199168] AH00094: Command line: '/usr/sbin/apache2'
[Wed Apr 12 18:32:27.288851 2023] [proxy_fcgi:error] [pid 738:tid 547857142144] [remote 192.168.178.72:50852] AH01067: Failed to read FastCGI header
[Wed Apr 12 18:32:27.288959 2023] [proxy_fcgi:error] [pid 738:tid 547857142144] (104)Connection reset by peer: [remote 192.168.178.72:50852] AH01075: Error dispatching request to :4443:
[Wed Apr 12 18:32:27.289265 2023] [proxy_fcgi:error] [pid 738:tid 547958018432] [remote 192.168.178.72:50852] AH01067: Failed to read FastCGI header
[Wed Apr 12 18:32:27.289298 2023] [proxy_fcgi:error] [pid 738:tid 547958018432] (104)Connection reset by peer: [remote 192.168.178.72:50852] AH01075: Error dispatching request to :4443:
[Wed Apr 12 18:37:27.797016 2023] [proxy_fcgi:error] [pid 738:tid 547991589248] [remote 192.168.178.72:50852] AH01067: Failed to read FastCGI header
[Wed Apr 12 18:37:27.797089 2023] [proxy_fcgi:error] [pid 738:tid 547991589248] (104)Connection reset by peer: [remote 192.168.178.72:50852] AH01075: Error dispatching request to :4443:

Database logs

tail: cannot open '/var/log/mysql/*.log' for reading: No such file or directory

Nextcloud logs

{"reqId":"VrAcfzA8JZXbp5nHQ1VQ","level":3,"time":"2023-04-12T16:41:17+00:00","remoteAddr":"","user":"--","app":"files_antivirus","method":"","url":"--","message":"OCA\\Files_Antivirus\\BackgroundJob\\BackgroundScanner::run, exception: Cannot connect to \"/var/run/clamav/clamd.ctl\": No such file or directory (code 2
{"reqId":"VrAcfzA8JZXbp5nHQ1VQ","level":3,"time":"2023-04-12T16:41:17+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"stream_socket_client(): Unable to connect to unix:///var/run/clamav/clamd.ctl (No such file or directory) at /var/www/nextcloud/apps/files_antivirus/lib/Scanner/Exter
{"reqId":"VrAcfzA8JZXbp5nHQ1VQ","level":3,"time":"2023-04-12T16:41:17+00:00","remoteAddr":"","user":"--","app":"files_antivirus","method":"","url":"--","message":"OCA\\Files_Antivirus\\BackgroundJob\\BackgroundScanner::run, exception: Cannot connect to \"/var/run/clamav/clamd.ctl\": No such file or directory (code 2
{"reqId":"VrAcfzA8JZXbp5nHQ1VQ","level":3,"time":"2023-04-12T16:41:17+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"stream_socket_client(): Unable to connect to unix:///var/run/clamav/clamd.ctl (No such file or directory) at /var/www/nextcloud/apps/files_antivirus/lib/Scanner/Exter
{"reqId":"VrAcfzA8JZXbp5nHQ1VQ","level":3,"time":"2023-04-12T16:41:17+00:00","remoteAddr":"","user":"--","app":"files_antivirus","method":"","url":"--","message":"OCA\\Files_Antivirus\\BackgroundJob\\BackgroundScanner::run, exception: Cannot connect to \"/var/run/clamav/clamd.ctl\": No such file or directory (code 2
{"reqId":"VrAcfzA8JZXbp5nHQ1VQ","level":3,"time":"2023-04-12T16:41:17+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"stream_socket_client(): Unable to connect to unix:///var/run/clamav/clamd.ctl (No such file or directory) at /var/www/nextcloud/apps/files_antivirus/lib/Scanner/Exter
{"reqId":"VrAcfzA8JZXbp5nHQ1VQ","level":3,"time":"2023-04-12T16:41:17+00:00","remoteAddr":"","user":"--","app":"files_antivirus","method":"","url":"--","message":"OCA\\Files_Antivirus\\BackgroundJob\\BackgroundScanner::run, exception: Cannot connect to \"/var/run/clamav/clamd.ctl\": No such file or directory (code 2
{"reqId":"VrAcfzA8JZXbp5nHQ1VQ","level":3,"time":"2023-04-12T16:41:17+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"stream_socket_client(): Unable to connect to unix:///var/run/clamav/clamd.ctl (No such file or directory) at /var/www/nextcloud/apps/files_antivirus/lib/Scanner/Exter
{"reqId":"VrAcfzA8JZXbp5nHQ1VQ","level":3,"time":"2023-04-12T16:41:17+00:00","remoteAddr":"","user":"--","app":"files_antivirus","method":"","url":"--","message":"OCA\\Files_Antivirus\\BackgroundJob\\BackgroundScanner::run, exception: Cannot connect to \"/var/run/clamav/clamd.ctl\": No such file or directory (code 2
{"reqId":"VrAcfzA8JZXbp5nHQ1VQ","level":3,"time":"2023-04-12T16:41:17+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"stream_socket_client(): Unable to connect to unix:///var/run/clamav/clamd.ctl (No such file or directory) at /var/www/nextcloud/apps/files_antivirus/lib/Scanner/Exter
{"reqId":"VrAcfzA8JZXbp5nHQ1VQ","level":3,"time":"2023-04-12T16:41:17+00:00","remoteAddr":"","user":"--","app":"files_antivirus","method":"","url":"--","message":"OCA\\Files_Antivirus\\BackgroundJob\\BackgroundScanner::run, exception: Cannot connect to \"/var/run/clamav/clamd.ctl\": No such file or directory (code 2
{"reqId":"VrAcfzA8JZXbp5nHQ1VQ","level":3,"time":"2023-04-12T16:41:17+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"stream_socket_client(): Unable to connect to unix:///var/run/clamav/clamd.ctl (No such file or directory) at /var/www/nextcloud/apps/files_antivirus/lib/Scanner/Exter
{"reqId":"VrAcfzA8JZXbp5nHQ1VQ","level":3,"time":"2023-04-12T16:41:17+00:00","remoteAddr":"","user":"--","app":"files_antivirus","method":"","url":"--","message":"OCA\\Files_Antivirus\\BackgroundJob\\BackgroundScanner::run, exception: Cannot connect to \"/var/run/clamav/clamd.ctl\": No such file or directory (code 2
{"reqId":"VrAcfzA8JZXbp5nHQ1VQ","level":3,"time":"2023-04-12T16:41:17+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"stream_socket_client(): Unable to connect to unix:///var/run/clamav/clamd.ctl (No such file or directory) at /var/www/nextcloud/apps/files_antivirus/lib/Scanner/Exter
{"reqId":"VrAcfzA8JZXbp5nHQ1VQ","level":3,"time":"2023-04-12T16:41:17+00:00","remoteAddr":"","user":"--","app":"files_antivirus","method":"","url":"--","message":"OCA\\Files_Antivirus\\BackgroundJob\\BackgroundScanner::run, exception: Cannot connect to \"/var/run/clamav/clamd.ctl\": No such file or directory (code 2
{"reqId":"VrAcfzA8JZXbp5nHQ1VQ","level":3,"time":"2023-04-12T16:41:17+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"stream_socket_client(): Unable to connect to unix:///var/run/clamav/clamd.ctl (No such file or directory) at /var/www/nextcloud/apps/files_antivirus/lib/Scanner/Exter
{"reqId":"VrAcfzA8JZXbp5nHQ1VQ","level":3,"time":"2023-04-12T16:41:17+00:00","remoteAddr":"","user":"--","app":"files_antivirus","method":"","url":"--","message":"OCA\\Files_Antivirus\\BackgroundJob\\BackgroundScanner::run, exception: Cannot connect to \"/var/run/clamav/clamd.ctl\": No such file or directory (code 2
{"reqId":"VrAcfzA8JZXbp5nHQ1VQ","level":3,"time":"2023-04-12T16:41:17+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"stream_socket_client(): Unable to connect to unix:///var/run/clamav/clamd.ctl (No such file or directory) at /var/www/nextcloud/apps/files_antivirus/lib/Scanner/Exter
{"reqId":"VrAcfzA8JZXbp5nHQ1VQ","level":3,"time":"2023-04-12T16:41:17+00:00","remoteAddr":"","user":"--","app":"files_antivirus","method":"","url":"--","message":"OCA\\Files_Antivirus\\BackgroundJob\\BackgroundScanner::run, exception: Cannot connect to \"/var/run/clamav/clamd.ctl\": No such file or directory (code 2
{"reqId":"VrAcfzA8JZXbp5nHQ1VQ","level":3,"time":"2023-04-12T16:41:17+00:00","remoteAddr":"","user":"--","app":"core","method":"","url":"--","message":"Error while running background job (class: OCA\\Mail\\BackgroundJob\\PreviewEnhancementProcessingJob, arguments: Array\n(\n    [accountId] => 2\n)\n)","userAgent":"-es not match.","Code":0,"Trace":[{"file":"/var/www/nextcloud/lib/private/Security/Crypto.php","line":134,"function":"decryptWithoutSecret","class":"OC\\Security\\Crypto","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/var/www/nextcloud/apps/mail/lib/IMAP/IMAPClientFactory.php","line":84,"funce parameters replaced ***"]},{"file":"/var/www/nextcloud/apps/mail/lib/IMAP/PreviewEnhancer.php","line":84,"function":"getClient","class":"OCA\\Mail\\IMAP\\IMAPClientFactory","type":"->"},{"file":"/var/www/nextcloud/apps/mail/lib/Service/PreprocessingService.php","line":81,"function":"process","class":"OCA\\Mail\\IMgroundJob/PreviewEnhancementProcessingJob.php","line":94,"function":"process","class":"OCA\\Mail\\Service\\PreprocessingService","type":"->"},{"file":"/var/www/nextcloud/lib/public/BackgroundJob/Job.php","line":78,"function":"run","class":"OCA\\Mail\\BackgroundJob\\PreviewEnhancementProcessingJob","type":"->"},{"filon":"start","class":"OCP\\BackgroundJob\\Job","type":"->"},{"file":"/var/www/nextcloud/lib/public/BackgroundJob/TimedJob.php","line":93,"function":"start","class":"OCP\\BackgroundJob\\TimedJob","type":"->"},{"file":"/var/www/nextcloud/cron.php","line":152,"function":"execute","class":"OCP\\BackgroundJob\\TimedJob","169,"message":"Error while running background job (class: OCA\\Mail\\BackgroundJob\\PreviewEnhancementProcessingJob, arguments: Array\n(\n    [accountId] => 2\n)\n)","exception":{},"CustomMessage":"Error while running background job (class: OCA\\Mail\\BackgroundJob\\PreviewEnhancementProcessingJob, arguments: Array\

Have you looked in your syslog for any read/write errors?

Let me see later and I will tell you.
I just ran into the same problem again and have to restore the state before restoring the database.

One question:
I’ve set up everything to restore the data and database. I rebooted several times then shut down and did a backup of the USB-boot-stick. Everything OK so far.

2nd I restored the database diabled maintenance mode and logged in with my NC user account to check if everthing looks like before the system crashed. At this point the data behind the database is missing and not restored yet. I rebooted several times. All ok. Then when I shut down and save the state before copying the whole data, the system does not come up again and I can’t log in via SSH any more.
Could it be a problem to restore the database before the actual data?
Why is it rebooting without a problem but shutting down kills everything?

You really should not restore the database without the files. That’s introducing a massive inconsistency to the system. You should restore them together.

Can you explain in detail exactly what you are doing in this step?

Is there anything showing on the console when this happens?

Anything on the console here too?

Maybe you should try restoring your backup to a virtual machine just to rule out a possible hardware issue.

Ok, so I will do both steps before I try shutting down.

I just type: “shutdown now” via SSH.
Wait a few minutes and disconnect power.
Take the USB-boot-stick and put it into my PC and back it up with win32Imager into an .img file.
Put the USB-stick back in the raspi and connect power.
Open putty and can’t log in via SSH any more.
Then I take a backup of the USB-boot-stick made before restoring the database and flash it.
After that the system comes up again.

Just “sudo reboot”

I guess I’m confused about what you’re trying to do. If you’re rolling back to a backup image of the card, what are you doing with the database and why?

It seems unlikely anything with the database would prevent the system from shutting down or booting correctly.

Yes, I think so too. But the problem always appeared after this step.

It’s just because setting up everything from scratch and restoring all data and database from my old instance takes quite some time. I usually make backups from the running system on my SD card before I do the next major step like restoring all data. For example I’ve set up a clean raspian and installed a fresh nextcloud via curl installer script and backed this up (with this I mean making a copy .img-file of the SD card and save it to my PC). So in case I do something stupid I easily can go back by flashing the .img-file to the SD card again. Then I installed all other services like borg, log2ram etc. Mounted the drives in fstab and updated NC to the latest version (26.0.0.11). That’s where I made a 2nd backup of my SD card. Then if I restore the database and see if everything in NC looks like it should, all services are running, I normally would make a third backup before transfering 2TB of data to the cloud. But that’s the point, if I shut down to back up the SD card, I can never boot it again and can’t access it via SSH any more. So I have to roll back to my 2nd backup of the SD card to figure out what’s wrong. But without beeing able to boot back into the system with the database restored it’s very hard to find out what was wrong.
Sure I could do all these steps without making a backup of my SD card until the cloud is fully working. But if I have to shut down the system because of whatever and get the same problem as I get now I had to start from scratch again.
In the past that never was a problem. I always made backups of my system (SD card) like this.

Sry if my process is confusing. In the past I was happy to have those backups and just flash them back in case it messed up updating php for example.

So… all the clouds data is restored and it’s working again. I haven’t tried to reboot or shut down yet.
There is only one problem so far. I can’t access my password in passwords app.
I think this is because the server secret has changed due to setting up a new instance?
Is it possible to look up the secret in one of my backups and just change it?

You should be able to to reboot your instance and have it working. If you are still concerned and have not replaced your existing disks please do so.

Time to replace the SD card. Pi’s allow you to boot off of SSD disk these days, so you can buy one of those for cheap and switch to it. WIll improve both performance and longevity.

Thumb drive.

If you are still running off of a thumb drive you can replace it with an SSD or spinning disk.

Here is the standard response given on common types of media for reference:

  • What kind of disks?
    • Spinning sata is fair to good
    • USB 2.0 external spinning drive garbage
    • Micro-SD card garbage
    • eMMC is fair
    • USB 3.0 external drive is fair for light usage
    • USB 3.0 SSD external disk Good!
    • nvme Good!
    • SSD Good!

Due to the described problems I switched the system to an USB-stick and changed the HDD for data and database to a new one.
Unfortunately the shutdown problem appeared with the USB-stick too. But that was with only the database restored without the data, yet.
Now everything is restored with all the data.
I will make sure if there are no potential problems and try to shutdown and power the system again.

Hopefully it will work.

1 Like

I replaced the SD card with this: https://www.amazon.de/dp/B08KSJ144R?psc=1&ref=ppx_yo2ov_dt_b_product_details

Can you tell me, if it is possible to replace the server secret in config.php?
When I try to access my passwords app, I get following error log:

[passwords] Fehler: Error “HMAC does not match.” in OCA\Passwords\Controller\Api\FolderApiController::show

When I am right, this is because the server secret is not the same as my old instance.
I have access to my old config file but I’m not sure if it’s just that easy.

I see. My recommendation was to stop using those flash thumb drives. Upgrade to an actual SSD like this:
https://www.amazon.com/SanDisk-1TB-Extreme-Portable-SDSSDE61-1T00-G25/dp/B08GTYFC37/

Not sure because I don’t use Passwords app.
What I do is restore a full backup of my Nextcloud.

https://docs.nextcloud.com/server/latest/admin_manual/maintenance/restore.html

Huuuuh… at least everything is running again.
I replaced /var/ww/nextcloud with my backup too.
After this I had to change “dbpassword” and “redis password” in config.php to the values of my new installation.
NC is online and all passwords are available again.

Last point on my list is to check if rebooting an shutdown process are working as they should.
But I will wait a few days until borg has made a full backup of my instance.

Ok, now that I have a full backup of my instance I shut down the system and transfered all OS data from the USB stick to a SSD. Worked well so far. The shutdown process took really long until the green LED stopped blinking. But I was able to start again without a problem.

After this I tried to reboot the system just to verify and for testing. Also after 1 hour of waiting the pi didn’t come back so I cut power and started again. At least there was no data corruption and it started again.

I remember that I once had problems with the shutdown process on nextcloudpi when SAMBA was activated. This is the case now too. So I will try to deactivate and see if it helps.

Try uninstalling the files_antivirus app. You never configured clamav so best to remove that app. Lots of errors related to it in your log. Might be hanging as a background process.