New Install - Moved data location missing .ocdata


I’m new to NextCloud and to UnRaid.
I got NextCloud up and running but decided to move the data location without realising the issues it would cause.
I now get an error saying that my .ocdata file is missing - (it is)

I’ve seen some comments about running a scan but I don’t understand how I’m supposed to run these.

I’m a little familiar with the terminal but I don’t know what I should be doing to fix my install.

Please help…

It is always good to start searching the forum for existing answers to similar requests:

Thanks, I have already done several searches on the net but unfortunately I cannot see an answer to my problem.
Most seem to relate the file already existing.

That said, this one result might help

I will see what this brings up

root@2865dc41772c:/# sudo grep datadirectory /var/www/nextcloud/config/config.php
grep: /var/www/nextcloud/config/config.php: No such file or directory

root@2865dc41772c:/# sudo ls -ld $( sudo grep datadirectory /var/www/nextcloud/config/config.php | awk ‘{ print $3 }’ | grep
-oP “[^’]*[^’]” | head -1 )
grep: unrecognized option: P
grep: /var/www/nextcloud/config/config.php: No such file or directory
BusyBox v1.31.1 () multi-call binary.

Usage: grep [-HhnlLoqvsriwFE] [-m N] [-A/B/C N] PATTERN/-e PATTERN…/-f FILE [FILE]…

Search for PATTERN in FILEs (or stdin)

    -H      Add 'filename:' prefix
    -h      Do not add 'filename:' prefix
    -n      Add 'line_no:' prefix
    -l      Show only names of files that match
    -L      Show only names of files that don't match
    -c      Show only count of matching lines
    -o      Show only the matching part of line
    -q      Quiet. Return 0 if PATTERN is found, 1 otherwise
    -v      Select non-matching lines
    -s      Suppress open and read errors
    -r      Recurse
    -i      Ignore case
    -w      Match whole words only
    -x      Match whole lines only
    -F      PATTERN is a literal (not regexp)
    -E      PATTERN is an extended regexp
    -m N    Match up to N times per file
    -A N    Print N lines of trailing context
    -B N    Print N lines of leading context
    -C N    Same as '-A N -B N'
    -e PTRN Pattern to match
    -f FILE Read pattern from file

drwxr-xr-x 1 root root 220 Apr 23 13:08 .

root@2865dc41772c:/# ls -l /media/
total 0
drwxr-xr-x 1 root root 0 Apr 17 00:25 cdrom
drwxr-xr-x 1 root root 0 Apr 17 00:25 floppy
drwxr-xr-x 1 root root 0 Apr 17 00:25 usb

root@2865dc41772c:/# systemctl status nc-automount-links
sh: systemctl: not found

I have tried to wipe NextClould from Docker, reinstalled and linked a different share and I still get the same error.

The commands with “grep” are all wrong.

Please post your datadir in

ls -al /path/to/datadir

and scan all:

sudo -u www-data php /var/www/nextcloud/occ files:scan --all
Post errors

I pulled that from the other thread.

I assume that these need to be entered into to the nextcoud terminal?

root@90efc764c285:/# /var/www/nextcloud/config/config.php
sh: /var/www/nextcloud/config/config.php: not found

root@90efc764c285:/# ls -al /path/to/datadir
ls: cannot access ‘/path/to/datadir’: No such file or directory

root@90efc764c285:/# sudo -u www-data php /var/www/nextcloud/occ files:scan --all
sudo: unknown user: www-data
sudo: unable to initialize policy plugin

ok, i fixed it.
I had to Telnet in and remove the app data files that had been built.
Now that they have gone, its working as expected… so far.

So following on from that I’ve got everything work as expected apart from remote access. I’ve followed SpaceInvaderOnes guide and I think I have everything setup correctly but I cannot connect via the internet. I get a few different errors.

“invalid response” to “took too long to respond” and “refused to connect”

Port Forwards are setup.

At this point I’m lost and I really don’t know what to do.

I have search all over the net and either can’t find an answer or one that I understand.

I cant change the nameservers on my domain so the CloudFlare option is out. I don’t believe these ports are blocked by my ISP.

Perhaps you test von inside. Do you really test from inside?

Hi Devnull,

Sorry I don’t understand?
Do you mean accessing the Nextcloud from inside my network - direct IP?

Just seen your PM, thank you.