I do not know this question is common or not. I want to track record of those files that is deleted in trashcan.I just read that after deletion it will go in content-store.Deleted so from where how can i get the details of deleted files.
1 Answers
You can use the searchservice to find all the nodes in the trashcan. These exists in archive://SpacesStore, just like you would in workspaces://SpacesStore .
String query = "@cm\\:title:mytitle.doc";
searchService.query(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, SearchService.LANGUAGE_FTS, )
If you delete a file, it will go into trashcan and into archive://SpacesStore . It will remain there forever, unless you (or the optional trashcan cleaner module) empty it out of the trashcan. After you empty the trashcan, it will still remain in archive://SpacesStore for 14 days. After those 14 days it will be removed from the DB and the content will be moved to contentstore.deleted
Nodes that have been emptied out of the trashcan, have all references(metadata) in the DB deleted, so they can no longer be accessed programatically. The only thing that remains is the raw content in contentstore.deleted.
A good explanation of alfresco content deletion is here: http://blyx.com/2014/08/18/understanding-alfresco-content-deletion/
Phase 2- Any user or admin (or trashcan cleaner) empties the trashcan: That means the content is marked as an “orphan” and after a pre-determined amount of time elapses, the orphaned content item ris moved from the alf_data/contentstore directory to alf_data/contentstore.deleted directory. Internally at DB level a timestamp (unix format) is added to alf_content_url.orphan_time field where an internal process called contentStoreCleanerJobDetail will check how many long the content has been orphaned.,f it is more than 14 days old, (system.content.orphanProtectDays option) .bin file is moved to contentstore.deleted. Finally, another process will purge all of its references in the database by running nodeServiceCleanupJobDetail and once the index knows the node has bean removed, the indexes will be purged as well.

- 1,409
- 11
- 20
-
i want to get the details that are deleted from archival store. is there any way to access contentstore.deleted ??? – Sachin Singh Mar 10 '16 at 08:50
-
i want to ask one more thing i m confused that if we will delete a file it will go in archive and after 14 days it will go in contentstore.deleted and from where it will store untill anybody will not delete maually. is it correct? – Sachin Singh Mar 10 '16 at 11:56
-
see updated answer ( if you delete a file, it will go into trashcan and into archive://SpacesStore . It will remain there forever, unless you (or the optional trashcan cleaner module) empty it out of the trashcan. After you empty the trashcan, it will still remain in archive://SpacesStore for 14 days. After those 14 days it will be removed from the DB and the content will be moved to contentstore.deleted) – Stefan De Laet Mar 10 '16 at 15:00
-
can we just track while deleting from trash and put in any log or something or alfresco have any logs for deleted file bcoz i dont want file i just want logs of deleted file. – Sachin Singh Mar 11 '16 at 06:35
-
That could be done: I suggest you customize the trashcan cleaner module ( https://github.com/rjmfernandes/alfresco-trashcan-cleaner ) so that it logs a message when it cleans out a file. – Stefan De Laet Mar 11 '16 at 08:55