Scan & sync missing files in database

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 23.0.3 snap1
Operating system and version (eg, Ubuntu 20.04): Ubuntu server 20.04.4
Apache or nginx version (eg, Apache 2.4.25): snap installation
PHP version (eg, 7.4): 8.0.16

The issue you are facing:
I uploaded folders with movies via web browser to my Nextcloud server. During upload there was some error.
I tried to remove folders and movie.mkv file (7.5 GB) but I received error that the file cannot be removed. (Error during deleting file)
So I logged in my Ubuntu server and I edited Movie folder as I needed (root user) via SSH (terminal).
I restarted SNAP (also tried restart Ubuntu server) but there is the problem.
I see folders and files that no longer physicaly exists on disk drive via web brovser.
So I like to know how to rescan whole file structure via Nextcloud to fix this issue.

Is this the first time you’ve seen this error? (Y/N): Yes

Steps to replicate it:

  1. Files uploaded via web browser - problem during upload
  2. SSH connection via terminal and set folder structure as needed
  3. Web browser see files that no longer exist.

The output of your Nextcloud log in Admin > Logging:

[PHP] Error: disk_free_space(): No such file or directory at /snap/nextcloud/30258/htdocs/lib/private/Files/Storage/Local.php#381

GET /index.php/apps/files/ajax/getstoragestats.php?dir=%2Fzabava%2Ffilmy%2FP%C3%A1n%20prsten%C5%AF%20-%20Dv%C4%9B%20v%C4%9B%C5%BEe%20(2002)%20-%20%5B1080p%20h265%5D%2FPan.prstenu.-.Dve.veze.(2002).-.%5B1080p.h264%5D
from 192.168.1.43 by bocian at 2022-04-24T19:17:16+00:00

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

snap default location

The output of your Apache/nginx/system log in /var/log/____:

PASTE HERE

PASTE HERE


Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

PASTE HERE

hi.

for this snap, i dont know…

so you may install occweb app…
then launch an occ file:scan

Thank you for help.

I have installed occweb app and ran these 2 commands
files:scan username
files:scan-app-data
Issue solved.

1 Like

Hi @vawaver

Here is how you can run it from the command line…

sudo nextcloud.occ files:scan --all

https://github.com/nextcloud-snap/nextcloud-snap/issues/505

https://github.com/nextcloud-snap/nextcloud-snap#included-cli-utilities

Thank you.
It seems to be more comfortable than the OCC app for me.

This is exactly the same things, the same commands…
Only difference is GUI use… very useful when you don’t have ssh access to your server !!!

seem you are able now to use command within your snap …