New Install - Moved data location missing .ocdata

Hi,

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:

https://help.nextcloud.com/search?q=.ocdata%20missing

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:/#

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:/#

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

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
/var/www/nextcloud/config/config.php

Then
ls -al /path/to/datadir

and scan all:

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

Thanks,
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.