NextcloudPi: bad Datadir choice

Hello
When I setup my NCP I didn’t specify a label for the datadir. So if I get it right the datadir should have been something like “/media/USBdrive/ncdata/LABEL”.

This is what it looks now.
image

So every time I plug in ad USB thumbdrive my NCP instance crashes immediately.

Can and if yes how can I add a label to my USB-Drive with the data on it in order to use other USB drives?

I want to add a second one to backup data and a third small one to backup NCP-settings.

Thanks in advance.

When I connect over SSH and type lsblk I find a partition called /media/myCloudDrive but as metioned above datadir is at /media/USBdrive/ncdata.

You can manually edit NC’s config with

sudo nano /var/www/nextcloud/config/config.php

and edit datadirectory to look like:

‘datadirectory’ => ‘/media/myCloudDrive/ncdata’

Thanks Oliver. But this wouldn’t move data right?

No it wouldn’t move data, the data is already there,

No, it would be

datadir /media/LABEL/ncdata

Just be careful doing this, after I did the same I lost access to the AppStore because Nextcloud still expects the “tmp” folder to be at /media/USBdrive/ncdata.

So to wrap up:
I change the respective line from datadirectory' => '/media/USBdrive/ncdata to datadirectory' => /media/myCloudDrive/ncdata
And NC will still know where data is because I changed the location? I don’t understand this to be honest.

@Robert_Spierenburg And what was your solution?

Actually I don’t understand why that labelling issue happened in the first place.

@OliverV So my backup device should be called /media/Backup/ncdata and an additional USB-Stick I want to use to store NCP-settings and NC settings for example media/Stick/ncdata?

Unfortunately I haven’t found a solution yet. Keep in mind it might not be at all related to your issue. I just wanted you be aware of a potential issue.