Hi,
I do have huge image local storage
/var/discourse/shared/standalone/uploads/default
57.5GiB [##########] /original
35.6GiB [###### ] /optimized
the original
56.7GiB [##########] /3X
667.6MiB [ ] /2X
155.5MiB [ ] /1X
and optimized
33.8GiB [##########] /3X
1.7GiB [ ] /2X
113.3MiB [ ] /1X
I found this settings and make this 1 and 2. Is it relevant settings?
I would like to drop all 3X images (original and optimized) and store/show only 2X picture?
How to setup this configuration?
T H A N K S
sam
(Sam Saffron)
21. Mai 2019 um 23:25
2
3x is just a naming convention it has nothing to do with image size
If you want to cut on storage you could run the rake task that irreversibly shrinks old images and drops fidelity
5 „Gefällt mir“
how to do it? what’s the command line?
sam
(Sam Saffron)
24. Juni 2019 um 07:09
4
This script should do it:
https://github.com/discourse/discourse/blob/4c89f7f88165c28bfc8ecb15a3be7346985d384e/script/downsize_uploads.rb
But I would be very very careful to have a full backup of everything prior to playing with it.
5 „Gefällt mir“
/var/discourse/shared/standalone/uploads/default
57.5GiB [##########] /original
35.6GiB [###### ] /optimized
please tell me which folder /original or /optimized I can drop to free up some space?
zogstrip
(Régis Hanol)
28. Juni 2019 um 15:05
6
Like @sam said, if you truly want to reduce your disk usage, you will need to downsize all your originals and re-generate all your thumbnails (ie. “optimized” images).
It’s an involved process since you have to update both the files on disk and the associated records in the database.
GOSH!
I’ve just ruined my /original folder during moving from one folder to another.
Is there any way to use images from /optimized folder? or from Postgres DB?
Am I in trouble now?
sam
(Sam Saffron)
30. Juni 2019 um 10:38
9
You can try recovering from optimized, but quality would be limited
1 „Gefällt mir“
zogstrip
(Régis Hanol)
30. Juni 2019 um 10:47
10
If you have a backup that includes uploads, you can extract them from the archive directly in the originals directory.
2 „Gefällt mir“
How to do it? I do have /optimized folder in full.
I backup only content without uploads.
Should I just copy /optimized to /original ?
sam
(Sam Saffron)
1. Juli 2019 um 00:01
14
look at:
./launcher enter app
rails c
Upload.last(10)
See the urls there, that is where we expect the uploads to be.
4 „Gefällt mir“
root@dastereo:/var/postgres_data_discourse# du -hs * | sort -rh | head -5
33G base
129M pg_wal
46M pg_xact
616K global
216K pg_subtrans
Does Postgres DB contain also pictures? Is it OK?
zogstrip
(Régis Hanol)
3. Juli 2019 um 08:10
16
The files are all stored on disk, the database only holds records of some metadata.