Extract files from orbeon/mysql

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Extract files from orbeon/mysql

khh7112
I created this script to extract the attachments from the orbeon DB, but the file formats are not recognized once they are extracted.  Does forms_runner convert them in some way when they are saved into mysql?



#!/bin/sh
echo "select file_name from orbeon_form_data_attach;" > tmp.sql
mysql --user=orbeon --password=$1 --host=jarjar --port=3306 orbeon <tmp.sql >listoffiles.txt
cat listoffiles.txt | while read file
do
  export myfile="$file"
  echo "Extracting $myfile"
  echo "select file_content from orbeon_form_data_attach where file_name = '$myfile';" > tmp.sql
  mysql --user=orbeon --password=$1 --host=jarjar --port=3306 orbeon <tmp.sql >$myfile
done




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws