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 במאי, 2019, 11:25pm
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 לייקים
how to do it? what’s the command line?
sam
(Sam Saffron)
24 ביוני, 2019, 7:09am
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 לייקים
/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 ביוני, 2019, 3:05pm
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 ביוני, 2019, 10:38am
9
You can try recovering from optimized, but quality would be limited
לייק 1
zogstrip
(Régis Hanol)
30 ביוני, 2019, 10:47am
10
If you have a backup that includes uploads, you can extract them from the archive directly in the originals directory.
2 לייקים
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 ביולי, 2019, 12:01am
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 לייקים
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 ביולי, 2019, 8:10am
16
The files are all stored on disk, the database only holds records of some metadata.