How to find (and restore) a single document from your Alfresco backup ?

If you want to find/restore a copy of a single document from a previous “alf_data/contentstore” backup, you can use the following steps:

First I assume you know the filename of the document you are looking for…
In the example below, it is: ‘Portal services offering.ppt’

Also, I assume you will be able to restore the backup copy of the database on a testing database server (with the proposed approach, no need to restore the contentstore on a real server filesystem, I also assume that your documents backup utility give you the opportunity to search a file into the backup archive without needing to restore the full contentstore on a file system…).

Run the following query on your database copy (restored from the backup):
select * from ALF_NODE_PROPERTIES where STRING_VALUE=’Portal services offering.ppt’ and QNAME='{}name’;

If you get one result (or more), you can then use the NODE_ID value(s) to identify the specific version your are looking for:
(if you get several values, that propably means there are several versions or copies of the same document).

select * from ALF_NODE_PROPERTIES where NODE_ID=14066558;

In the search result, you can check the version number of the document (if any) by looking at the value related to this attribute (see QNAME column):

For each NODE_ID of your list, the QNAME='{}content’ property should contain a value like:

select * from ALF_NODE_PROPERTIES where NODE_ID=14066558;

select * from ALF_NODE_PROPERTIES where NODE_ID=93913845;

The path ‘//2009/10/28/16/9/’ corresponds to this directory in the alf_data contentstore (document storage):

So you should be able to use this info to find the corresponding directory in your contentstore backup archive.

And the file “e594bfcc-c3d3-11de-a2cf-79b22a9754d5.bin” correspond to a copy of your documents ‘Portal services offering.ppt’ which has been renamed automatically by Alfresco durung the save operation.

Hope this will help,

related post: 3 ways to find and restore a (single) “lost” document stored in Alfresco


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: