(SOLVED) Nextcloud database update user script


Recommended Posts

Posted (edited)

Hi!

 

I’m trying to regularly update my nextcloud database since I’m using an inbox folder there to import files to Paperless-ng. Previously this script has worked in User Scripts:

 

#!/bin/bash
docker exec nextcloud sudo -u abc php /config/www/nextcloud occ files:scan -all

 

The script has stopped working though. Can anyone see/tell me what is wrong with it? If I do the steps of the command separately it works, i.e. docker exec -it nextcloud /bin/bash then cd to nextcloud and then the sudo command.

 

//M

Edited by muppie
Link to comment
  • 1 month later...
On 5/4/2021 at 9:40 PM, juan11perez said:

This is what I use to scan my external storages

 

 

docker exec --user www-data nextcloud php console.php files:scan admin --path=/admin/files/gdrive

Thanks! Sorry for the late reply! I’ll try it

Link to comment
  • muppie changed the title to (SOLVED) Nextcloud database update user script

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.