General information
In alfresco information about a document is stored in three places:
- File system
- Dat Base
- Lucene Indexes
Content Life Cycle
Where the document information is stored
I Created a content in alfresco with some binary file uploaded. Each content will have a unique ID which can be found by viewing the details of the uploaded content from the web client. Format of the node ref: workspace://SpacesStore/a0ec9fcf-3775-4e2c-b3c0-d326bd8acf2b)
The information about the file is stored in the following places:
- In file system
In my file system that content is locate at “alf_data\contentstore\2013\7\26\14\29\5ad9140e-1534-48c3-83d7-3050a6b956e2.bin”
Note: alf_data location can be count in "alfresco-global.properties" file
- In database
Main information about the content (meta data) is stored in alf_node table.
SELECT an.id, an.store_id, als.protocol, als.identifier, an.uuid FROM alf_node as an, alf_store as als where als.id = an.store_id and an.uuid='a0ec9fcf-3775-4e2c-b3c0-d326bd8acf2b';
- Lucene index
Alfresco stores indexed data in workspace store in my system path is “alf_data/lucene-indexes/workspace/SpacesStore/...”
Lucene index location can be count in "alfresco-global.properties" file
In my file system that content is locate at “alf_data\contentstore\2013\7\26\14\29\5ad9140e-1534-48c3-83d7-3050a6b956e2.bin”
Note: alf_data location can be count in "alfresco-global.properties" file
Main information about the content (meta data) is stored in alf_node table.
SELECT an.id, an.store_id, als.protocol, als.identifier, an.uuid FROM alf_node as an, alf_store as als where als.id = an.store_id and an.uuid='a0ec9fcf-3775-4e2c-b3c0-d326bd8acf2b';
Alfresco stores indexed data in workspace store in my system path is “alf_data/lucene-indexes/workspace/SpacesStore/...”
Lucene index location can be count in "alfresco-global.properties" file
What happens when a content is deleted
Now, lets delete that content from alfresco
- To delete Content go to Alfresco web client and click on the delete icon:
Now the information about the file is stored in the following places:
- In file system
In my file system that content is locate at “alf_data\contentstore\2013\7\25\14\29\5ad9140e-1534-48c3-83d7-3050a6b956e2.bin”
- In database
SELECT an.id, an.store_id, als.protocol, als.identifier, an.uuid FROM alf_node as an, alf_store as als where als.id = an.store_id and an.uuid='a0ec9fcf-3775-4e2c-b3c0-d326bd8acf2b';
(you can find node in archive store in protocol column)
- Lucene index
node is in archive store
Once the content is deleted, it is moved in to archived store
In my file system that content is locate at “alf_data\contentstore\2013\7\25\14\29\5ad9140e-1534-48c3-83d7-3050a6b956e2.bin”
SELECT an.id, an.store_id, als.protocol, als.identifier, an.uuid FROM alf_node as an, alf_store as als where als.id = an.store_id and an.uuid='a0ec9fcf-3775-4e2c-b3c0-d326bd8acf2b';
(you can find node in archive store in protocol column)
node is in archive store
Once the content is deleted, it is moved in to archived store
Delete the content from archived store
Even now the deleted content is not completely removed from the system. Even though this content is not available through Web client it is still stored in the file system and DB.
- In file system
In my file system that content is locate at “alf_data\contentstore\2013\7\26\14\29\5ad9140e-1534-48c3-83d7-3050a6b956e2.bin”
Note: alf_data location can be count in "alfresco-global.properties" file
- In database
SELECT an.id, an.store_id, als.protocol, als.identifier, an.uuid, an.node_deleted
FROM alf_node as an, alf_store as als
where als.id = an.store_id and an.uuid='a0ec9fcf-3775-4e2c-b3c0-d326bd8acf2b';
In node_deleted you can see as a ‘1’
To find all deleted node that are not shifted to deleted store
SELECT * FROM alf_content_url where orphan_time is not null;
- Lucene index
We don’t have entry as we depleted content from archived store.
In my file system that content is locate at “alf_data\contentstore\2013\7\26\14\29\5ad9140e-1534-48c3-83d7-3050a6b956e2.bin”
Note: alf_data location can be count in "alfresco-global.properties" file
SELECT an.id, an.store_id, als.protocol, als.identifier, an.uuid, an.node_deleted
FROM alf_node as an, alf_store as als
where als.id = an.store_id and an.uuid='a0ec9fcf-3775-4e2c-b3c0-d326bd8acf2b';
In node_deleted you can see as a ‘1’
In node_deleted you can see as a ‘1’
To find all deleted node that are not shifted to deleted store
SELECT * FROM alf_content_url where orphan_time is not null;
We don’t have entry as we depleted content from archived store.