Clean up of xwiki.org recycle bins

Hi everyone,

I’m starting to plan next upgrade of XWiki.org and as part of it I’d like to clean up the recycle bins: we never perform real deletions so we keep piling up stuff in it. We still have docs in it deleted in 2007. Currently there’s more than 2800 docs deleted and 600+ attachments.

So the proposal here is not to remove everything, but to write a snippet to remove anything deleted before a given date. The question is: what date do we use?

If we want to be safe we could decide to keep all docs deleted from less than a year. AFAICS it means keeping around 30 attachments and 45 docs. Not so many and we can even decide to clean up manually what remains if we’re sure. IMO it should be good enough. WDYT?

Hi Simon,

What is the problem with having lots of deleted docs/attachments? Is it because it’s taking a lot of disk space? (how much is it taking?). I don’t think it affects performance in general.

I’m pretty sure we don’t need any of the docs in there (I don’t remember the last time I had to undelete some docs) but on the principle I’m not sure I see the need to clean the recycle bin (except if we don’t have enough disk space on the machine ofc and it’s taking a lot of it).

Let’s say I’m +0 to keep 1 year of deleted docs/attachments.

Thanks

PS: I appreciate the willingness to clean things up, this is great.

There’s no real issue with it: it takes some space but I don’t think it’s really a problem here.
For me it’s more that I find useless to keep things deleted forever and it might avoid mistake (like restoring the wrong doc), so it’s only about cleaning things up.

Same here, I don’t see the need.

It’s not a -1 since I doubt we need anything in there, it’s more that I don’t like that we feel we need to cleanup the bin (and on my side I don’t see any reason to).

Let’s say +0 for 1 year.

This sounds like a nice feature for XS :slight_smile: , related to Loading... .

+0

Thanks,
Marius

Yes I knew about that one, if I’m finding it’s easier to just implement it maybe I’ll do that, but unlikely to be pushed in 15.10.x in any case…

If you do have such a snippet please share. We have a working snippet for attachments deleted x days ago but we’re looking for a script regarding articles too.

I’ve found https://snippets.xwiki.org/xwiki/bin/view/Extension/PurgeAttachmentsRecycleBin and https://snippets.xwiki.org/xwiki/bin/view/Extension/Empty%20Trash%20Bin on snippets.xwiki.org. No idea if they work though.

Thanks. The first one we already used as a template. The second one is missing the possibility to adjust the days or date deleted documents were deleted and older. So that we can keep e.g. documents which were deleted the last days/week.