Changes between Version 8 and Version 9 of DbPurge

Show
Ignore:
Author:
tonig (IP: 87.221.134.90)
Timestamp:
11/02/09 08:01:41 (3 weeks ago)
Comment:

small clarifications to the restore section

Legend:

Unmodified
Added
Removed
Modified
  • DbPurge

    v8 v9  
    130130 
    131131 
    132 == Restoring archived results into the DB == 
     132== Restoring archived results into the DB == 
    133133 
    134134To extract old statistics, one has to recover the xml archive files (records  get periodically removed from the ''results'' table  by '''db_purge''').  This section explains a quick hack to recover the xml archive into a database. For now, only the '''result_archive''' is recreated, without xml data. 
    148148#!/bin/sh 
    149149 
    150 # iterate over all arguments in the command line, filter them through 
    151 # a fixup, feed them to mysql for import 
     150# iterate over all arguments in the command line, unzip them, 
     151# strip XML-in-XML and feed them to mysql for import 
    152152 
    153153tmpf=/tmp/boinc_import.$$ 
    156156    echo Processing $f ... 
    157157 
    158     # We need to remove the xml text 
     158    # Remove the 3 xml snippets of each result. Treat the file as a huge string. 
    159159    zcat -f $f | perl -w -e ' 
    160160        use strict; 
    191191 3. At the end of the run, a  '''result_archive''' table will be reconstructed on the server. To add the most recent results, contained in the '''result''' table,  do (it will also take a while) 
    192192{{{             
    193 INSERT INTO res SELECT * FROM result; 
     193INSERT INTO result_archive SELECT * FROM result; 
    194194}}} 
    195195 

If this page is incomplete or incorrect, please edit it or add it to the wiki to-do list. To do this, you must be logged in; click Login or Register above.