Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Command about Scanning after adding Mimetype #92

Closed
tim-krehan opened this issue Feb 12, 2019 · 8 comments
Closed

Command about Scanning after adding Mimetype #92

tim-krehan opened this issue Feb 12, 2019 · 8 comments

Comments

@tim-krehan
Copy link

Isn't the command you specified in the README.md unneccessary "large" on big instances?

The following should do it as well:
sudo -u www-data php occ maintenance:mimetype:update-db --repair-filecache

@jivarson
Copy link

That's what I did on the old 0.4.0 on NC13, worked now aswell on NC15

@jhass
Copy link
Owner

jhass commented Feb 12, 2019

Honestly, I was just following the suggestion from #81, I have no deeper knowledge about the specifics of either command.

If anyone with deeper knowledge cares to elaborate on the specifics and implications of both commands we can decide which to recommend, or maybe even mentioned both with directions on when to prefer either.

If nobody cares to do this, then this is probably a non-issue, so I'll close this in a couple of days.

@tim-krehan
Copy link
Author

tim-krehan commented Feb 12, 2019

As far as I understand this, the files:scan command will scan all the files, as the command i specified does only add the specified mimetypes to the database. Which is for more performant and does not take ages to complete.

of course you could specify the path to each *.kdbx-file, but that is also more complex to implement.

I would suggest to at least add a comment to the command, that it will take it's time to complete.
If it's a big instance the file path (or folder path) should be specified.

Or we could use the above specified command. I tested it on my 15.0.2, an it is working without scanning the huge load of data.

@zertrin
Copy link

zertrin commented Feb 14, 2019

I also wondered yesterday. I did run the command recommended on the README and it took almost 3 hours to complete... On reading the documentation of the occ command (https://docs.nextcloud.com/server/15/admin_manual/configuration_server/occ_command.html#maintenance-commands-label), I wondered if there was a good reason not to use occ maintenance:mimetype:update-db --repair-filecache instead.

Edit: by the way, thanks for now supporting recent versions of NC, I was waiting for it for a long time too. Many thanks again for providing this extension ❤️

@dugite-code
Copy link

In my recent experience with upgrading to NC15 I had to use sudo -u www-data php occ maintenance:mimetype:update-db --repair-filecache otherwise the databases are downloaded not opened

@dragonandy
Copy link
Contributor

what i got is a integrity check failed from the overview page,log down here

Technical information
=====================
The following list covers which files have failed the integrity check. Please read
the previous linked documentation to learn more about the errors and how to fix
them.

Results
=======
- core
	- INVALID_HASH
		- core/js/mimetypelist.js

Raw output
==========
Array
(
    [core] => Array
        (
            [INVALID_HASH] => Array
                (
                    [core/js/mimetypelist.js] => Array
                        (
                            [expected] => dc48de7ad4baa030c5e563350c9a80b274bad783f6f5adbf1595ecef6c6a32e52890a24cb26cddb0aa20193ba52c001150c68d8bfb567f0aed566f4029a190a3
                            [current] => 53613657e01ad07fb878200f174a72a8ac062f6f3d52624034c85157a2bd7517b6b79b18ddad5b312319e7d9bec6b1d409c8ec9098480a356777e0dcee2f39f8
                        )

                )

        )

)

in my case i run a nextcloud 15 instanse and you should run
sudo -u www-data php occ maintenance:mimetype:update-js or just
sudo -u www-data php occ maintenance:mimetype:update-db --repair-filecache
not a full file scan sudo -u www-data php occ files:scan --all from the README.md
its not a good idea beacuse it will scan through all the files in the nextcloud installation which is unnecessary and it takes time to run

docs link
https://docs.nextcloud.com/server/15/admin_manual/configuration_server/occ_command.html?highlight=mimetypemapping
https://docs.nextcloud.com/server/15/admin_manual/configuration_mimetypes/index.html?highlight=mimetypemapping

@gotmax23
Copy link

gotmax23 commented Jun 3, 2019

The file that the instructions state to create a file that is named incorrectly and the commands do not follow the NC 16 Docs. Thus, it does not work. I made a pull request. (#105)

@SimJoSt
Copy link

SimJoSt commented Jan 22, 2020

@jhass as this is no longer necessary, this issue should be closed.

@jhass jhass closed this as completed Jan 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants