My SD card got corrupted and I installed ncp fresh from the image to a new card. My database and data dir are on a USB drive.
I started the setup, but didn’t use the ncp setup wizard. Instead I
- enabled ssh
- enabled USB auto mount
- updated NCP (my image was not current)
- used ncp-config to run the NCP config import (
ncp-config_ xxx.tar
) to restore the ncp configuration - updated NC because also this was not the current and less than the version before the crash. (I was lucky and had a DB backup as my first try messed up my DB as a NC 24.x was trying to “upgrade” from a v25.0 database …)
However, I noticed that both the directory of the database and the NC data directory was still at the default location and not on my USB drive.
Shouldn’t these settings be also restored?
Or is there a better / recommended way to replace a broken SD card?
In fact, I looked at the sources of nc-database.sh
and nc-datadir.sh
and (hopefully) have manually executed all the steps from there.
(And the first time I did this I made the mistake and accidentally upgraded php to 8.2 and I had to do the same procedure again … as I wasn’t able to fix all issues.)
NCP v1.51.0
Nextcloud version: 25.0.3.2
Operating system and version: Raspberry with Debian GNU/Linux 11 (bullseye)
Apache version: 2.4.54
PHP version: 8.1