How to clean, refill the cloud: start all over


we somehow messed up our cloud because of illegal characters in filenames and filenames being to long. Sync-jobs interrupted, filelock etc. There’s a mismatch between Windows, synctool, webserver, ftp, nextcloud considering filenames.

I’ve downloaded all files to my pc with FTP. Using powertoys to cleanup all filenames, replacing and removing illegal characters and other hickups.

There’s the option to rescan using the commandline. I can’t use the commandline.
I do not know how nextcloud keeps track of files using the database. Simply deleting all and upload new files over FTP will not be an option is my guess? Because of the database with all filelinks and filelocks.

Is there a way to just simpy delete everything from the cloud, upload all files by FTP and re-index everything? Drag/drop directory’s to the cloud or something like that.

What to do?
nextcloud 24.0.6

The CLI file scan is the tool for what you’re describing. It reconciles the database with what files are in the user’s folder.

If you can’t use the CLI, then you will most likely need to contact your system administrator for help.

Why can you not use php occ files:scan --all? Do you not have shell access?
Maybe you can delete full directorys or users in Nextcloud web GUI.

Maybe OCC Web works for you.
But it is only supported till Nextcloud 23.

Fatal error: Uncaught Error: Call to undefined function shell_exec() in…

Hmm. I think it’s time to reconsider the webhost…

Is it possible to do this over SSH?

I truncated the file_lock table. Was able to remove everything by deleting everything in the cloud and upload all new files.
Thnx for the replys. It’s now pretty clear we need to rethink our hostingsolution