Lost files from filesystem
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-10-2009 03:50 AM
Hi all,
yesterday a customer of mine did an error: he deleted some folders inside the contentstore folder… He deleted some folders like
contentstore/2009/7/20
contentstore/2009/7/21
contentstore/2009/7/22
Since the documents contained in those folders are not so important, we'd like to synchronize the database by clearing the entries pointing to the lost files.
Is it possible? Is there any procedure to synchronize the database with filesystem in case of lost physical files?
We are using Alfresco community version 3.1
P.S. Restoring a previous backup is not an option…
Thank you in advance.
Mauro
yesterday a customer of mine did an error: he deleted some folders inside the contentstore folder… He deleted some folders like
contentstore/2009/7/20
contentstore/2009/7/21
contentstore/2009/7/22
Since the documents contained in those folders are not so important, we'd like to synchronize the database by clearing the entries pointing to the lost files.
Is it possible? Is there any procedure to synchronize the database with filesystem in case of lost physical files?
We are using Alfresco community version 3.1
P.S. Restoring a previous backup is not an option…
Thank you in advance.
Mauro
Labels:
- Labels:
-
Archive
4 REPLIES 4
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-11-2009 08:38 AM
Wow, you have one stupid client there
You have to write your own crawler to check every file & cm:content property and your content, version, archive and avm stores to check if they still match in Java, and deleted whatever is gone.

You have to write your own crawler to check every file & cm:content property and your content, version, archive and avm stores to check if they still match in Java, and deleted whatever is gone.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-11-2009 09:40 AM
You don't neccessarily need to crawl through all your data. The folders in the content store repository correspond to dates, so your client lost 3 days worth of content. You may be able to search for all nodes created on those particular dates which will at least tell you which files you have lost.
But the most important thing (for any IT system, including alfresco) is to make sure backups are being made.
But the most important thing (for any IT system, including alfresco) is to make sure backups are being made.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-15-2009 05:43 AM
You don't neccessarily need to crawl through all your data. The folders in the content store repository correspond to dates, so your client lost 3 days worth of content. You may be able to search for all nodes created on those particular dates which will at least tell you which files you have lost.
But the most important thing (for any IT system, including alfresco) is to make sure backups are being made.
Thank you very much. I'll try to find out all the pending records and clean up the db.
Anyway, can you confirm that when I finished the cleaning everything starts to work fine again? Or is it possible that something was corrupted and will not be repaired after this operation?
In the mean time, I replaced that folders with a very old backup (maybe every file was there, I can't guarantee it…) and I rebuilt the Lucene index. Now I get the following exception in some folders:
javax.faces.FacesException: org.alfresco.service.cmr.repository.InvalidNodeRefException: Node does not exist: workspace://SpacesStore/d3bf11fa-34ed-2341fefedfdf
P.S. I know that a backup is important but someone doesn't give the right importance to backups… Now I'm sure that it will be a priority 😉
Mauro
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-15-2009 06:24 AM
You need the content store And the database backup together.
Either one without the other is not going to work.
However if you do have a backup of the filesystem then you can simply copy the missing folders from backup. Problem over!
However assuming that you really don't have a backup then take a backup of both database and content store before you touch the live alfresco system! And install that backup onto a test system so you can check whether your proposed changes work.
What you are missing is the content for some of your nodes. There's no worry about any "corruption", your database is intact. And your content store is fine as well except for a missing few folders.
Your first task is to do some analysis to identify which nodes have a problem.
And what are the associations to those problem nodes.
You may be able to "fix up" the content or delete the problem nodes.
Either one without the other is not going to work.
However if you do have a backup of the filesystem then you can simply copy the missing folders from backup. Problem over!
However assuming that you really don't have a backup then take a backup of both database and content store before you touch the live alfresco system! And install that backup onto a test system so you can check whether your proposed changes work.
What you are missing is the content for some of your nodes. There's no worry about any "corruption", your database is intact. And your content store is fine as well except for a missing few folders.
Your first task is to do some analysis to identify which nodes have a problem.
And what are the associations to those problem nodes.
You may be able to "fix up" the content or delete the problem nodes.
