Restore user / file association

I’m using NextClouPi v.0.67.2 (NextCloud 14.0.4) and there I’ve executed the rc-init command.
Now all the settings are gone, but the files of the past users are all still there /media/USBdrive/ncdata/.
Now I would like to reassociate new users to the old file folders to make them visible on the files app.

Just creating a new user with the same name does not work out.

Any help appreciated.

Thank you and kind regards

If the new user’s data folder has the same name as the old one, then a running a manual file scan should help:

sudo -u www-data php </path/to/NC-Folder/occ> files:scan --all

Your NC folder will likely be in /vaw/www/nextcloud, but that could also be something else.

1 Like

Unfortunately that didn’t help.
The NextCloud folder is indeed /var/www/nextcloud/
The old users folder is at /media/USBdrive/user1/
The new users account name is “user1” as well.

Is there anyway to set the user storage folder in the seetings or so?

Looks like you previously used the externa storage module, to place the user folders onto te external USB drive. If nothing else works… you still can use a symlink from /media/USBdrive/user1/ to /var/www/nextcloud/data/.

There are other, more involved options as well, but I’d check the external storage app first.

edit config.php and set the path of the datadir to /media/XXX, then you can rescan as mentioned above

I had to change the data directory as it was set to default at /var/www/…
My old data was instead at /media/USBdrive/…
Aftrewards I run the files scan command budy mentioned.