Forum Discussion
Can someone confirm if the following SQL will identify the files associated with a given review?
SELECT a.review_id, b.version_id, b.version_filepath, b.version_contentmd5
FROM review_version_list a, version b
WHERE a.version_id = b.version_id AND a.review_id = <REVIEW#>;
Hi,
We don't recommend performing direct manipulations with Collaborator database. The recommended approach is described in the "How do I archive files in the content cache?" FAQ entry.
- eng_sysadmin9 years agoOccasional Contributor
The SQL statement was just to identify the files associated with a given review. I have no intention of making changes to the database. I just want someone to confirm if my statement does indeed identify the correct files. Once confirmed, I plan to create a script that queries the database and then moves the files from the cache directory to an archive directory within the file system.
I already saw the article you link to. It describes a brute force archive method. There is no way to know which review will be archived and which will not be archive. Worse yet, it is very likely the method will end up archiving some, but not all the files for a review if its time frame overlaps the randomly chosen timestamp. This method also requires a lot of manual traversing of the cache directory structure in order to identify the files that can be archived. Finally, there is the statement "If you are doing document reviews, we don't recommend you archive any of the files in the content cache."
- eng_sysadmin9 years agoOccasional Contributor
I wrote the attached Perl script that archives the cache files for the input review number. It's smart enough to not remove files used by later reviews and will create a TGZ with all the files associated with the review. If you want to execute against a range of review, replace the (@ARGV) of the foreach loop with (1..n) to archive reviews 1 through n.
Related Content
- 2 years ago
- 3 years ago
- 3 years ago
Recent Discussions
- 2 months ago