Final Attachment Delete

Hi Guys,

kinda new to Xwiki so sorry if this is a famous question.

I didnt figure out how to finally delete attachments.

  1. I’m deleting on the page
  2. Im deleting the “deleted files” again in the document index but i got
    still the same amount of files in the Wiki-Folder and no change of size at all.

What did i forget?

Cheers,
Tom

By default attachments are stored in the DB, not on FS. see http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Attachments

Thanks for your fast reply. I kind of understand the different storage methods but i dont see/understand
a way to clean the junk in the database because i’m not able to find them on the wiki-surface and i’m
not able to enter der database file. What to do?

The DB size is also not going to change because when you delete pages or attachments they’re saved in the Recycle Bin so that they can be recovered. So what you’re looking after is maybe to delete them from the bin?
(http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Attachments#HDeletion)

You can go to the Index Page and click the right tabs to delete them permanently.

If you wish to script this, check http://snippets.xwiki.org/xwiki/bin/view/Extension/PurgeAttachmentsRecycleBin (at your own risks, this is an oldish unsupported script).

Thanks

That is what i mentioned, i deleted the files out of the document index 1 by 1 under the tab: deleted attachments
but after i did that and restarted the whole wiki no change in the folder at all sizewise. The Files are gone but
somehow i got the feeling they are still lying around in the database file!

What database engine are you using and which folder are you looking at exactly ?

Hope the root directory will help to answer both of your questions: Its wiki/data/database/xwiki_db.lobs

Pretty sure all the files are placed there. Before i just monitored the whole wiki folder regarding the size, now
i took a specific look to that db_lobs File and it defintely increases when uploading pictures and stuff.

Cheers,
Tom

OK so you are using the HSQLDB database engine and indeed stuff are stored there.

But the way the XWiki jetty/hsqldb package is configured this is only backup. The database is actually in memory and update this file from time to time so maybe you are looking at it a bit too fast. To be sure it’s up to date you can stop XWiki.

Hi tmortagne,

like i mentioned this is what i did. I deleted everything out of the page attachments and the “backup-base”. (deleted attachments overview) and “restarted” the xwiki which in my opinion includes stopping it! ;)))

Still no change in Size. I consider this information as important because i’m in front a big step to have a lot
of attachment traffic and i dont want to increase the DB-Size into Orbit with unused Attachments.

Let me ask it that way. Is there a chance to change the storage-technique of Xwiki to a local folder where
i can delete the files manually if necessary?

Cheers,
Tom