nextcloud docker mass data scan


Mystic

Recommended Posts

Both nextcloud/mariadb was installed today so they have the latest dockers versions.  Everything is working correctly, I just need to know how to run a DB scanner so the files I copied to the new user are updated/indexed.

 

I had to rebuild my nextcloud by mistakenly removing files while learning TERMINAL.  I really screwed up because I set up Duplicati but never ran it so I didn't have a good backup.

I recreated nextcloud/mariadb and everything is clean and NEW.  I've decided to simply move using terminal.  I just need to know how to run the "sudo -u www-data php console.php files:scan --all" script.

 

My Setup

UnRaid: vr 6.9.0-rc2

nextcloud: vr 20.0.3

Ryzen 9 3900X

Memory: 32GB

 

My instructions:

To force NextCloud to scan for the new files in terminal type the following:

cd /www/nextcloud
sudo -u www-data php console.php files:scan --all

 

My results:

sudo: unknown user: www-data
sudo: error initializing audit plugin sudoers_audit

 

I can't seam to find out how to fix this.  I've read several discussion talking about if the user is correct. however, I don't know how to find this information. and before I miss something up, I figured I'd asked for help.

Edited by Mystic
important info moved to the top
Link to comment
2 hours ago, Greygoose said:

I had a similar situation.

 

1. Console into the docker

2. cd/config/www/nextcloud

3. sudo -u abc php7 occ (type command)

 

This is what i used, but not sure is entirly what you need.

sudo -u abc php /config/www/nextcloud/occ db:add-missing-indices

 

 

nextcloud still did not scan/update and I received the following error message:

 

PHP Warning:  PHP Startup: Unable to load dynamic library 'pdlib.so' (tried: /usr/lib/php7/modules/pdlib.so (Error loading shared library /usr/lib/php7/modules/pdlib.so: No such file or directory), /usr/lib/php7/modules/pdlib.so.so (Error loading shared library /usr/lib/php7/modules/pdlib.so.so: No such file or directory)) in Unknown on line 0
mCloud 20.0.3

Edited by Mystic
Link to comment
  • 4 months later...

So I'm curious if there is another solution for scanning for file changes. I will commonly be wanting to transfer files from another docker into my NextCloud. Any options for causing a scan when file changes are noticed? Or even some way to manually force a scan without having to remember a command to type into the console ever time I transfer some files over?

 

Nevermind I stumbled on the solution right after posting this. I instead just setup a External Storage source direct to the folder I use to store such things. This way I just drop my files there as normal and nothing extra has to be done. Plus it makes it easy to share the content with other users on my NextCloud setup.

Edited by Reallango
Link to comment
  • 10 months later...

Hey there,

 

the thread is a bit dusty, but here are my 2 cents, regarding this idea:

 

On 5/3/2021 at 9:36 PM, Reallango said:

Any options for causing a scan when file changes are noticed?

 

There is by now no official supported way to do that. I am also adding stuff via shares to my nextcloud, because my ISP speed is very poor. 

You could use a cron or timer and execute the re-sync from outside the nextcloud docker with:

 

docker exec -it nextcloud sudo -u abc php /config/www/nextcloud/occ files:scan username

 

hth, receens2k

Edited by receens2k
typo
  • Thanks 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.