Comments (12)
The job mentioned above will only clean previews of deleted files. There is no mechanism for deleting previews of old files.
from server.
i suppose the issue began on 2019/2020 within an earlier version of nextcloud
Please elaborate on the issue, what did you observe, what do you think is not right, what is an obsolete preview?
The expected behavior is: Previews are generated for supported file types. If the source file is deleted, the previews are removed as well.
We don't track the last access for files, and therefore cannot know when a preview was accessed the last time.
from server.
No, this will only replace the preview provider not the storage. Imaginary is an external service that offers great performance and a wide variety of supported preview formats.
It will not store your previews. Instead, it will process them on the fly and send them back to Nextcloud to be stored.
from server.
Previews are still generated on demand. Nothing has changed about that.
Yep, but they should be only generated on demand and not automatically on every update. I've many users who don't use the webinterface and, thus, generating many previews is useless.
Yesterday I disabled preview generation ('enable_previews' => false
), but still new previews are generated (even right now) and showing up in the previews folder. Existing previews are still shown on the browser interface (that's ok) and the photo app shows no previews at all (and does not seem to generate new).
I opened a separate issue: #45654
from server.
1 - Is there such an automatic mechanism ?
Yes. It runs hourly: https://github.com/nextcloud/server/blob/master/lib/private/Preview/BackgroundCleanupJob.php
Are you getting any errors in your logs like perhaps was reported in #42540?
2 - Is there a manual mechanism ?
There is no single command that does this currently. Though this would be a reasonable enhancement.
from server.
@joshtrichards - no - as far i see i do not have those or some of those errors mentioned in #42540
i analysed how many of directories i've got in the preview folder for every year:
[root@server ~]# grep ' 2010' /tmp/file_list_of_preview_dir|wc -l
0
[root@server ~]# grep ' 2017' /tmp/file_list_of_preview_dir|wc -l
357
[root@server ~]# grep ' 2018' /tmp/file_list_of_preview_dir|wc -l
925
[root@server ~]# grep ' 2019' /tmp/file_list_of_preview_dir|wc -l
8382
[root@server ~]# grep ' 2020' /tmp/file_list_of_preview_dir|wc -l
4292
[root@server ~]# grep ' 2021' /tmp/file_list_of_preview_dir|wc -l
345
[root@server ~]# grep ' 2022' /tmp/file_list_of_preview_dir|wc -l
224
[root@server ~]# grep ' 2023' /tmp/file_list_of_preview_dir|wc -l
248
so - i suppose the issue began on 2019/2020 within an earlier version of nextcloud
I did count all image files [jpg/jpeg/png/gif/bmp/tiff/svg] for all users :
Totally 313 GB of used space for all images - Nextcloud Preview will use 38% of space of them !
So, it is assumed, that the cleanup operation will not work as expected.
That means a manual (controlled by the cloud admin) mechanism for cleanup preview space is urgently needed.
from server.
thanks Daniel for those specific questions.
obsolete - preview files, where no co-existing image is existing
observe - Ratio between the size of the preview folder (121GB) and the actual size of all images (313GB)
Yes, that's my view of things too: "If the source file is deleted, the previews are removed as well."
It would be nice to have a way to find out if files exist for existing previews, something like this:
- create a list of image files
- check if the corresponding image file (still) exists for the preview
- if no, delete preview
It would also be good, if the cloud admin could set the maximum size for the preview folder (so that the system automatically deletes the previews, that have not been used for the longest time - similar to what happens with the recycle bin).
Do you need a feature request for this or do you think this is “useless” :-)
from server.
Please also note that the ratio is not 1 preview per image.
There are quite a few preview sizes generated per file (64x64, 356x356, 1024x768, and so on).
Also, not only image are taken into account (MP3, Vidos, PDF, and other too can count).
So, 38% is not a very big number IMO.
See if needed:
server/config/config.sample.php
Lines 1195 to 1347 in 54afea4
And https://github.com/nextcloud/previewgenerator (specially the "I don't want to generate all the preview sizes" part).
from server.
thx @solracsf - yes, i'm aware about the ratio (not 1 preview per image).
May this could come in place to export the cloud preview to external (interim) storage ==>
/**
* Set the URL of the Imaginary service to send image previews to.
* Also requires the ``OC\Preview\Imaginary`` provider to be enabled.
*
* See https://github.com/h2non/imaginary
*/
'preview_imaginary_url' => 'http://previews_hpb:8088/',
/**
from server.
Thx @st3iny / Richard for this explanation :-)
from server.
My previews folder grew over 250 GiB.
Was there a change recently in Nextcloud? IIRC Nextcloud used to generate previews only on demand (this is what I'd like to keep), but with (27/28)/29 it seems to automatically generate previews as soon as a file is uploaded/changed (using Nextcloud Client not the browser). May this be related to the (new?) FilesMetadata job?
Is there a way to get the old behavior back?
from server.
Previews are still generated on demand. Nothing has changed about that.
from server.
Related Issues (20)
- [Bug]: Slow bulk-move operation after upgrade to 28
- [Bug]: Cannot open video files shot on phone camera on web
- Issue with Bulk Tagging since Nextcloud 28 Updat HOT 2
- Unified Search for apps on Discovery page does not work HOT 1
- Create public API for user list actions
- [Bug]: Canceling a move operation should not show an error
- [Bug]: Label is missing for enforced password for link share
- Predict database migration impact of upgrades HOT 5
- [Bug]: "dirty table reads" after Upgrade to 29.0.2 HOT 1
- Redesign search UI HOT 6
- [Bug]: 403 Forbidden on public shares HOT 3
- [Bug]: Default setting for download limit not adhered to
- Can development Kkfileviwer plug HOT 1
- Add expire mechanism for preview images HOT 7
- [Bug]: Temporary Error on Login. Even after update to NC 29 HOT 1
- [Bug]: "Temporary Error" on Login, even after Upgrade to NC 29 HOT 15
- Resolving references from public share HOT 2
- Last login date (user:lastseen) does not work for desktop clients
- [Bug]: TypeError: r is not a function logreader-main.mjs HOT 1
- [Bug]: Drag'n'Drop to a folder not correctly detected on safari
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from server.