Lost my external drive

Hi, I have nextcloud pi on raspberry pi 4. My data was on an external drive.

The drive was damaged. I have now changed the drive. Created an ext4 partition and obviously nothing is working.

I have a backup of my data on my local computer.

Can someone help me reconfigure nextcloud pi?

Have a look here:

Hope it helps.

The same happened to me 2 months ago on RPi4 and ncp (not docker). My system was installed on sd card, and data folder with database folder were moved to external hdd.

So I ran nc-init command from ncp-config to make a new clean instance, then also with ncp-config moved data and data folders to hdd, and in nextcloud added “external storage” to copy files to the instance.

I think after this step you can use your backup file. I didn’t try because as usual in such cases my last backup was made long time ago. Instead I tried to use old database to recover user passwords (because of tockens for different android apps) but without success. I found it easier to make new tockens for all 3 users of my instance.

I’d do a clean install and use ncp’s restore script, if a backup is available. Or just restore the files from my pc using the nc-client.