Cleaning the media archive? Options
tkahn
Posted: Tuesday, June 12, 2007 9:53:40 AM

Rank: Fanatic

Joined: 11/24/2006
Posts: 321
Location: Stockholm, Sweden
First, is it correct that nothing on a file level is ever deleted in the media archive? It seems to me that when I delete files in Umbraco (2.1.6) they disappear from the media view in the admin but the actual files remain on the server.

Is there a way to avoid this (rinse out all old files)?



Web Developer at Kärnhuset - http://www.karnhuset.net - Stockholm, Sweden
racer.x
Posted: Tuesday, April 01, 2008 12:06:46 PM

Rank: Devotee

Joined: 7/20/2006
Posts: 69
Location: Nürnberg, Germany
Does anyone know a solution for this.
MediaFolder is growing, growing, ...

Thank you - for any ideas - Horst
imayat12
Posted: Tuesday, April 01, 2008 12:53:21 PM

Rank: Addict

Joined: 7/19/2006
Posts: 593
Location: Preston, UK
Guys,

I believe this has been addressed in v3.

Level 2 certified. If it aint broke dont fix.
drobar
Posted: Tuesday, April 01, 2008 1:47:39 PM

Rank: Umbracoholic

Joined: 9/8/2006
Posts: 1,410
Location: KY, USA
This is better in v3, but not 100% perfect (in my opinion). Here's what happens as I understand it...

When you create a new image in the media section and upload your image, umbraco will save the image and a thumbnail of it to the filesystem in a uniquely-numbered folder.

If you delete the media item's node from the media section the image is deleted.

If you update the image by uploading a replacement image to the existing media node, then umbraco will replace the existing file on the filesystem *if* the uploaded file has the same filename as the existing image. That is, umbraco will over-write the file if the replacement image is the same name as what is already there.

But if you upload a replacement image to an existing media node and the replacement image's filename is not the same as the existing image... you will end up with two images in the uniquely-numbered folder on your filesystem. It is in this way that your media section can grow.

The best approach, then, is to either delete unused nodes and make new ones, or to be sure you always upload images (or files) with the same name as what's already there so that the outdated files get over-written with the replacement files.

cheers,
doug.


MVP 2007-2009 - Official Umbraco Trainer for North America - Percipient Studios
tkahn
Posted: Thursday, April 24, 2008 11:27:38 AM

Rank: Fanatic

Joined: 11/24/2006
Posts: 321
Location: Stockholm, Sweden
Just now one of my clients called and reported that their disk space was full. It could be "natural causes" - that they have uploaded a lot of documents and images, but I suspect that it's not only that?

I don't feel 100% reassured that all measures to save disk space has been taken. Now I will try to find files to remove manually.

This server also uses ImageGen for graphic headlines etc. and I saw that the data/Cached folder contained quite a lot of files. If I'm not mistaken, these are regenerated when needed, so I could delete everything in the folder?

Web Developer at Kärnhuset - http://www.karnhuset.net - Stockholm, Sweden
dawoe
Posted: Thursday, April 24, 2008 12:18:51 PM

Rank: Aficionado

Joined: 1/19/2008
Posts: 147
Location: Belgium
Have look at this post to find out what files are still in use by umbraco :
Cleaning up orphan files in media folder

Converting a DotNetNuke site to Umbraco : Follow it here
drobar
Posted: Thursday, April 24, 2008 2:32:37 PM

Rank: Umbracoholic

Joined: 9/8/2006
Posts: 1,410
Location: KY, USA
You're right, the /data/Cached folder can be deleted at any time. ImageGen will simply create new images as requested and then save them to the cache for reuse. If images were previously created that are now no longer needed you'll save space. Otherwise you'll gradually end up with the same files in the cache.

Also, the /data/Cached folder is for text graphics. But you would also find "Cached" folders alongside any images that were resized with ImageGen (in the media tree or some other custom folder where images are stored for the site).

You can safely delete every Cached folder on the site. ImageGen will recreate whatever is needed as it is requested by website visitors.

cheers,
doug.

MVP 2007-2009 - Official Umbraco Trainer for North America - Percipient Studios
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.