Changes between Version 8 and Version 9 of DbPurge
- Timestamp:
- Nov 2, 2009, 8:01:41 AM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DbPurge
v8 v9 130 130 131 131 132 == Restoring 132 == Restoring archived results into the DB == 133 133 134 134 To 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. … … 148 148 #!/bin/sh 149 149 150 # iterate over all arguments in the command line, filter them through151 # a fixup,feed them to mysql for import150 # iterate over all arguments in the command line, unzip them, 151 # strip XML-in-XML and feed them to mysql for import 152 152 153 153 tmpf=/tmp/boinc_import.$$ … … 156 156 echo Processing $f ... 157 157 158 # We need to remove the xml text158 # Remove the 3 xml snippets of each result. Treat the file as a huge string. 159 159 zcat -f $f | perl -w -e ' 160 160 use strict; … … 191 191 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) 192 192 {{{ 193 INSERT INTO res SELECT * FROM result;193 INSERT INTO result_archive SELECT * FROM result; 194 194 }}} 195 195