Announcement

#1 2016-04-27 12:48:58

IGraham
Member
UK
2011-09-28
193

dtaabase size reduction

Hello/Hi/Greetings,

My hosting company want to move me to a different tariff as I'm using to much webspace, the solution would be to use less webspace.

Is it possible to reduce the overall database size by in some way reducing (and removing) all images over a certain size. Because of the amount of photos this would have to be automatic - far to many to go through individually.

If so what would i have to do - fairly specific instructions please as i wouldn't want to do more than and not be able to recover

Piwigo version: 2.8.0
PHP: 5.3.28 (Show info) [2016-04-27 11:47:25]
MySQL: 5.5.47 [2016-04-27 11:47:25]
Piwigo URL: http://

Offline

 

#2 2016-04-27 13:18:04

flop25
Piwigo Team
2006-07-06
7037

Re: dtaabase size reduction

hello,
you are talking about webspace on the distant hard drive or the MySQL database? because both terms are not identical


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#3 2016-04-27 13:48:17

Graham
Guest

Re: dtaabase size reduction

Thanks for the reply flop.
I have access to Piwgo itself
I have access to the remote files
I have access to the SQL database through cpanel

If I have to do anything by way of the cpanel and the SQL database that's going to need some fairly specific instructions as I'm not at all up on SQL

But any help you can give appreciated

 

#4 2016-04-27 13:50:58

Graham
Guest

Re: dtaabase size reduction

And yes we are talking distant hard drive - belonging to the hosting company

 

#5 2016-04-27 13:54:35

flop25
Piwigo Team
2006-07-06
7037

Re: dtaabase size reduction

Ok so you can go the Size options and remove the size you don't want Then remove from _data/i pics with these sizes Unfortunalty the only automatic way I know for sure would be to remove everything in _data/i then re generated the size from the Batch Manager or let the system generate them on the fly


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#6 2016-04-28 10:31:39

IGraham
Member
UK
2011-09-28
193

Re: dtaabase size reduction

flop

have looked in data/i/upload
and not all the photos are there, out of 13 categorized by year folders only 5 are shown, where would i find the rest ?
there is another 'upload' folder directly in the root piwigo folder that contains (apparently) the same files as data/i/upload hat would the purpose of this be ?

When you say to remove everything (an option) from data/i/upload and let the system regenerate them, do you mean i would have to re-upload or that the regeneration would be from cashed photos

Offline

 

#7 2016-04-28 16:42:38

flop25
Piwigo Team
2006-07-06
7037

Re: dtaabase size reduction

Please take the tour 'Scaling' and enjoy the trip


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#8 2016-04-30 11:38:38

IGraham
Member
UK
2011-09-28
193

Re: dtaabase size reduction

Hello again
Where do i find the tour 'Scaling'
Within my piwigo installation i can only find the tours 'First Contact', 'Privacy' & 2.7/8 Tour

Offline

 

#9 2016-04-30 12:39:09

flop25
Piwigo Team
2006-07-06
7037

Re: dtaabase size reduction

ooops sorry I was thinkinf it was released but tha'ts still a WIP
https://raw.githubusercontent.com/Piwig … caling.tpl

Piwigo generates on the demand and on the fly the resized pictures: so the first user browsing the gallery after an upload will trigger the generation of the thumbnails, for instance. At that moment the server ressources might be too hight for some hosting. Then those pictures generated are stored, so no further picture generation will be done again.
After a big upload, you might prefer to trigger the generation of those resized pictures yourself: instead of having a small long term resource consumption; the server will have a short peak of computation. According to your hosting, it might be better to generate once, quickly. Choose the /"Generate/" action in the Batch Manager to do so.
For advanced users, and if you have a FTP access, you can upload resized pictures generated on your computer in the _data/i folder: be careful when naming the files. Piwigo checks if the original has been modified compared to the date of the resized pictures.


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#10 2016-05-01 11:34:53

IGraham
Member
UK
2011-09-28
193

Re: dtaabase size reduction

Thanks flop, clear explanation, most useful

So the generated images are stored in piwigo/data/i/upload
the original images are stored in ?? piwigo/upload ??

flop please confirm the location of the original upload

as long as the original image is stored in a different location i can (having set size preferences) delete a number of generated images at a time thereby decreasing server load as they are regenerated.

again thanks

Offline

 

#11 2016-05-01 11:52:29

flop25
Piwigo Team
2006-07-06
7037

Re: dtaabase size reduction

That's right Everything in data is temporary stuff


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#12 2016-05-02 12:25:39

IGraham
Member
UK
2011-09-28
193

Re: dtaabase size reduction

thanks flop, is understood and doable, even found out why some images/folders weren't showing, bad exif info for original uploaded files, they are there but not where i expected them to be (is fixable)

Next :)
can i use something like imagemagick to resize the original uploaded images (on the server) or will that give some sort of database problem or maybe the resize can be rerun or a script maybe
Any thoughts on if or how it can be done. Have looked at previous answers didn't really find a good answer

Offline

 

#13 2016-05-02 13:36:58

flop25
Piwigo Team
2006-07-06
7037

Re: dtaabase size reduction

in order to batch resize and rename, you can use any software like Xnview on Windows ; you can even install locally a duplicate of your distant piwigo install (upload pics, import datatabse and dowload the /upload folder, generate and finally upload the resized ones) There are also some Tools on our Extension repository ; never tested but you can try them


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

#14 2016-05-03 12:13:15

IGraham
Member
UK
2011-09-28
193

Re: dtaabase size reduction

Was worried that doing anything to the original uploaded photos 'might' have database implications but seems not, as long as the image name stays the same.

Thanks for your help Flop, much appreciated.

Offline

 

#15 2016-05-03 13:07:46

flop25
Piwigo Team
2006-07-06
7037

Re: dtaabase size reduction

Great!
Have a good day!


To get a better help : Politeness like Hello-A link-Your past actions precisely described
Check my extensions : more than 30 available
who I am and what I do : http://fr.gravatar.com/flop25
My gallery : an illustration of how to integrate Piwigo in your website

Offline

 

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact