Restore of backup does not work using NCP -> ncp crashes

Nextcloud version (eg, 20.0.5): [ can't see it ]
Operating system and version (eg, Ubuntu 20.04): [ the one coming with NextCloudPi_RPi_11-27-20.tar ]
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.38 (Debian)
PHP version (eg, 7.4): [ ? ]

The issue you are facing:

  • ncp halts after preparations and starting “restore” of existing backup

Is this the first time you’ve seen this error? (Y/N):

YES

Steps to replicate it:

the situation is that I have an external SSD containing the “ncdata” and “ncdatabase” folders where the original contents (user data and database) reside. I encountered a kind of file system crash (execution and group settings seem to have been altered, causing loads of error messages). so I decided to reset the NextCloud system and restore the configuration and database from a previous auto-backup (no data but configuration and database).

1. install latest NCP image on a new SD and boot Raspberry Pi

the NextCloud configuration was located on the old SD card but will by now have been deleted while putting the new NCP image onto the SD card.

2. do some language, keyboard, ssh, … settings

on the new command line, after all the initializations, upgrades and updates have passed, the system seems to be stable. now, update NCP to v1.37.0 which seems to be the currently latest version using sudo ncp-update. after that, I create a mount point within the file system using sudo mkdir /media/SSD_240GB and sudo mount /dev/sda1 /media/SSD_240GB in order to get access to my ncdata, ncdatabase and backup folders.

… time to log in from a browser.

3. start init page (url of the Raspberry Pi) within browser

this works as expected and I save the provided (long) passwords for the “ncp” user on the NC application and NCP application.

4. start NCP application within browser and log in with “ncp” and new NCP-password

works fine. I see all the settings.

5. set nc-data setting to point to /media/SSD_240GB/ncdata folder

here, NCP seems to copy further user data (maybe the initial one of the ncp user) below the /media/SSD_240GB/ncdata folder. but that would be ok for me as long as my user data is not touched.

6. set nc-database to point to /media/SSD_240GB/ncdatabase folder

here, NCP tells me that the target folder is not empty. so, I don’t know if the path was set correctly anyways, or not. I assume, that it had been set internally and now attempt to restore my configuration and database from an old backup.

7. click on restore and point to the latest backup tar file on my SSD

NCP finds it and starts restoring. first the configuration files (this seems to work fine, as the config.php has been updated), and then the database. but here, NCP seems to stop operation and a see the “sand watch” for hours. after “refresh” of the browser page I see a “Something went wrong. Try refreshing the page”. even after a re-boot of the Raspberry Pi, neither NCP nor NC application is accessible anymore. NCP does not respond at all and NC shows:

Internal Server Error

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.

Does “restore” work in a different way than expected? Or do I just have to remove the contents of /media/SSD_240GB/database before a “restore” will work properly?

Is there any hint how to get NextCloud up and running while keeping my data in ncdata on the SSD (as well as the files on my client computer which I hope to be able to synchronize again as soon as everything runs fine again)?

The output of your Nextcloud log in Admin > Logging:

[ not visible ]

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

[ is correct as before the move ]

The output of your Apache/nginx/system log in /var/log/____:

[ shows no errors, yet ]

Maybe can run ncp-report and share output via pastebin or similar.
Also output of

ls -lh /media/
and
df -hT

Could be useful to investigate further.
This nc-restore method has always worked fine for me.

I’d try restoring again without changing the path to db and nc-data, they should be restored by the backup.