How can a user who deleted a document get it back?

It is possible to recover the latest version of a document if someone has accidentally deleted it from TeamForge.

However, note that you can recover the raw document but not undelete it from the app. The user will have to add the document back into TeamForge, and the history of the document will not be recovered. If you need a true undelete so that the history is available, please contact Technical Support and ask for us to schedule our Professional Services group for you.

Let's assume you have a project in TeamForge called Test, and the URL in your browser when you load this project is: http://your_sfee_server/sf/projects/Test. Please note the word after projects, this is your project name.

Now, let's assume the file to be retrieved was in a folder called 'foo' in the document manager. Further, let's assume the document was called 'example'. On the database, run the following command:

select stored_file.raw_file_id, document.id, item date_last_modified, item.title,
            stored_file.file_name, sfuser.full_name from item, folder, document, document_version,
            stored_file, sfuser where item.title like '%example%' and item.folder_id = folder.id and
            folder.path = 'docman.root.b' and document.id = document_version.document_id and
            document_version.stored_file_id = stored_file.id and item.is_deleted = 't' and
            item.last_modified_by_id = sfuser.id ;  

This will return something like:

raw_file_id | id | date_last_modified | title | file_name | full_name

Examine the rows of output to determine which of the returned results is the document you need, from the title and the name of the file that was uploaded. Once you've determined this, look for the file in /opt/collabnet/teamforge/var/deleted_files.


            yujr0C98B989011083DBFF4F534F | doc1001 | 2007-04-11 08:49:19-07 | example |
                foo.txt | Joe User bxma0C98B98901115B9CE99E82C2 | doc1002 | 2007-04-11 08:49:19-07 |
                example | test.txt | Joe User rpyf0C98B98901116DD1E40F9F8B | doc1003 | 2007-04-11
                08:49:19-07 | example | findme.txt | Joe User ltrq0C98B9890111D76E74920A0E | doc1004
                | 2007-04-11 08:49:19-07 | example | project_logo.jpg | Joe User

        

Let's say the fourth document above was the one you wanted. You can find it at: /opt/collabnet/teamforge/var/deleted_files/l/lt/ltr/ltrq/ltrq0C98B9890111D76E74920A0E. Simply copy that file off the system, rename it to project_logo.jpg and return it to the user.